Help how to move object on the rope like spline? - Printable Version +- Obi Official Forum (https://obi.virtualmethodstudio.com/forum) +-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html) +--- Forum: Obi Rope (https://obi.virtualmethodstudio.com/forum/forum-4.html) +--- Thread: Help how to move object on the rope like spline? (/thread-2204.html) |
how to move object on the rope like spline? - emreaa - 28-04-2020 Hello, I want to move player or any gameobject move on rope way like a spline. Is this possible? Thanks. RE: how to move object on the rope like spline? - josemendez - 29-04-2020 Yes, use: Code: rope.GetComponent<ObiPathSmoother>().GetSectionAt(normalizedCoord); normalizedCoord ranges from 0 (start of the rope) to 1 (end of the rope). This method will return a ObiPathFrame struct, that contains rope position, color, thickness and orthonormal frame (tangent, normal, binormal) at that coordinate. Note that unlike splines, ropes do not consistently define twist along their main axis. Rods do, though. RE: how to move object on the rope like spline? - emreaa - 29-04-2020 (29-04-2020, 08:33 AM)josemendez Wrote: Yes, use: RE: how to move object on the rope like spline? - josemendez - 29-04-2020 It was just a placeholder. Obviously you should pass your own normalized coordinate, depending on where along the rope you want the object to be. |