Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Moving object along the rope
#2
(20-12-2021, 08:57 PM)sodach1 Wrote: Hi guys. Can anyone give me an advice on which features to use to attach an object to a rope and move it along, like along a dynamic spline?
    I wanted to use Particle Attachment and move the path point assigned in there, but as far as I understood, you can't move path points like this. So the thing is what should I do?

You can use:

Code:
var section = rope.GetComponent<ObiPathSmoother>().GetSectionAt(float mu);

GetSectionAt() takes a normalized coordinate as input (a float from 0 to 1, 0 being the start of the rope and 1 being the end) and returns a struct containing position, normal, tangent and bitangent (a full orthonormal frame) of the rope at that point.

Also see the utility script /Obi/Scripts/RopeAndRod/Utils/ObiRopeAttach.cs for an example of how to use it to place an object along the rope.
Reply


Messages In This Thread
Moving object along the rope - by sodach1 - 20-12-2021, 08:57 PM
RE: Moving object along the rope - by josemendez - 21-12-2021, 08:11 AM
RE: Moving object along the rope - by sodach1 - 21-12-2021, 02:15 PM
RE: Moving object along the rope - by josemendez - 21-12-2021, 02:35 PM