09-01-2023, 10:23 AM
(This post was last modified: 09-01-2023, 10:24 AM by josemendez.)
Hi!
If you don't need two-way coupling (the rope both receiving forces from and applying forces to the object), the simplest approach is to use the path smoother's GetSectionAt() method. It takes a float in the 0,1 range as parameter and returns an orthonormal frame in the rope's path, which you can use to place the object.
The included ObiRopeAttach utility script uses this method, you can just place it on an object and it will follow the rope.
Now, if you do need two-way coupling (which would seem the case since you mention "whilst the rope reacts physically correct to the new masses.") and want this to happen as a reaction to a collision against the rope, it's considerably more complex as it involves collision callbacks and runtime constraint creation:
- Detect collisions between the rope and other object. This can be done using collision callbacks: http://obi.virtualmethodstudio.com/manua...sions.html
- Create a new pin constraint at runtime. See: http://obi.virtualmethodstudio.com/manua...aints.html
kind regards,
If you don't need two-way coupling (the rope both receiving forces from and applying forces to the object), the simplest approach is to use the path smoother's GetSectionAt() method. It takes a float in the 0,1 range as parameter and returns an orthonormal frame in the rope's path, which you can use to place the object.
The included ObiRopeAttach utility script uses this method, you can just place it on an object and it will follow the rope.
Now, if you do need two-way coupling (which would seem the case since you mention "whilst the rope reacts physically correct to the new masses.") and want this to happen as a reaction to a collision against the rope, it's considerably more complex as it involves collision callbacks and runtime constraint creation:
- Detect collisions between the rope and other object. This can be done using collision callbacks: http://obi.virtualmethodstudio.com/manua...sions.html
- Create a new pin constraint at runtime. See: http://obi.virtualmethodstudio.com/manua...aints.html
kind regards,