Latest Threads |
Scripting rod forces
Forum: Obi Rope
Last Post: chenji
10 hours ago
» Replies: 25
» Views: 2,370
|
Burst error causing crash...
Forum: Obi Rope
Last Post: josemendez
Yesterday, 07:03 AM
» Replies: 1
» Views: 101
|
Controlling speed of emit...
Forum: Obi Fluid
Last Post: josemendez
06-09-2025, 06:29 AM
» Replies: 1
» Views: 321
|
Looks nice on editor but ...
Forum: Obi Fluid
Last Post: josemendez
04-09-2025, 07:20 AM
» Replies: 3
» Views: 608
|
How to Shorten or Scale t...
Forum: Obi Rope
Last Post: josemendez
02-09-2025, 09:53 AM
» Replies: 5
» Views: 697
|
The Limitation of Using O...
Forum: Obi Rope
Last Post: josemendez
01-09-2025, 10:30 PM
» Replies: 1
» Views: 451
|
Bug Where a Straight Segm...
Forum: Obi Rope
Last Post: josemendez
01-09-2025, 08:46 PM
» Replies: 1
» Views: 449
|
Having an issue with obi ...
Forum: Obi Rope
Last Post: Ben_bionic
29-08-2025, 04:23 PM
» Replies: 4
» Views: 915
|
Non-uniform particle dist...
Forum: Obi Rope
Last Post: chenji
29-08-2025, 09:05 AM
» Replies: 4
» Views: 786
|
Is it possible to impleme...
Forum: Obi Rope
Last Post: chenji
27-08-2025, 10:13 AM
» Replies: 2
» Views: 705
|
|
|
procedure control point does not spawn particle in correct place |
Posted by: bugbeeb - 29-07-2024, 03:21 AM - Forum: Obi Rope
- Replies (2)
|
 |
I'm making something like a grappling hook, but I need to respawn the line each time it's triggered. To do this I modified some code from the obi grappling hook example where the blueprint is regenerated and I set the control points. However, the particles don't seem to spawn in the correct location. Here is the code to spawn the particles:
```
var localPos = rope.solver.transform.InverseTransformPoint(transform.position);
var characterLocalPos = rope.solver.transform.InverseTransformPoint(character.transform.position);
rope.ropeBlueprint = null;
var filter = ObiUtils.MakeFilter(0x0000FFFE, 0);
blueprint.path.Clear();
blueprint.path.AddControlPoint(characterLocalPos, Vector3.zero, Vector3.zero, Vector3.up, 1f, 0.1f, 1, filter, Color.white, "Start");
blueprint.path.AddControlPoint(localPos, Vector3.zero, Vector3.zero, Vector3.up, 1f, 0.1f, 1, filter, Color.white, "End");
blueprint.path.FlushEvents();
yield return blueprint.Generate();
rope.ropeBlueprint = blueprint;
```
But the first and last particles are noticebly off by the same amount whereas I would expect them to be located exactly at the transform positions specified in the blueprint. Am I doing something wrong here?
|
|
|
Attaching gameobjects after tear up |
Posted by: Ferhat123 - 25-07-2024, 03:07 PM - Forum: Obi Rope
- Replies (4)
|
 |
Hi,
After cutting the rope into two, I want to attach gameobjects to the ends of each rope piece.
I guess I can't add control points at runtime to attach these gameobjects so how can I do it.
Thank you,
|
|
|
Rope static attachment seems to lag behind the moving object it's attached to |
Posted by: ShawnF - 25-07-2024, 02:26 PM - Forum: Obi Rope
- Replies (3)
|
 |
You can see what I mean here: https://youtu.be/cMG1YjnYDwM
The rope has an attachment to the character's hand, but it follows a bit behind the char as you move.
Solver is on FixedUpdate, character is being moved through physical forces. Both the character and the rope have interpolate on.
Code for the attachment is here, in case there's something about the initial setup that's causing problems:
Code: public void AttachParticle(RopeChar ropeChar, int particleIndex)
{
attachedRopeChar = ropeChar;
// Create a new attachment and set it to be attached to the character's hand
attachment = obiRope.gameObject.AddComponent<ObiParticleAttachment>();
attachment.target = attachedRopeChar.attachTransform;
// Handle gameplay of attached char (swings from hinge, the rope is just visual and used for collision detection)
attachedRopeChar.AttachToRope(this);
// Move the collided particle to the char's hand pos
UnityEngine.Vector3 relativePlayerPos = attachedRopeChar.attachTransform.position - solver.transform.position;
solver.positions.SetVector3(particleIndex, relativePlayerPos);
// Create a new particle group and assign it the particle that you collided with
ObiSolver.ParticleInActor particleInActor = solver.particleToActor[particleIndex];
ObiParticleGroup group = ScriptableObject.CreateInstance<ObiParticleGroup>();
group.particleIndices.Add(particleInActor.indexInActor); // index of the particle in the actor
attachment.particleGroup = group;
}
|
|
|
Rope hierarchy |
Posted by: zack_Lee - 24-07-2024, 08:40 AM - Forum: Obi Rope
- Replies (1)
|
 |
I want to recycle my rope when it doesn't collide and there are no other ropes above it. I've now solved the collision problem. But what about hierarchies? How do I know there is no other rope above this rope
|
|
|
Obi Rope Cursor ChangeLength With Collision |
Posted by: zack_Lee - 24-07-2024, 08:36 AM - Forum: Obi Rope
- Replies (3)
|
 |
When I was using Obi Rope, I wanted to dynamically modify the length of the rope. But modifying the length will cause the collision between the rope and the rope to fail, and the two ropes that are entwined with each other will untie, is there any solution?
|
|
|
|