Help Question About Making Grappling Hook - 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 Question About Making Grappling Hook (/thread-2164.html) |
Question About Making Grappling Hook - relevantname - 14-04-2020 Hi, my intention is making grappling hook effect. But not like in the examples. My rope is already initialized on scene. What I want to do when I press the mouse button it scales up to object's position, then pinned to the object and stay on this length. I tried it like this; Code: private IEnumerator Attach_Coroutine() But the attachment point is not the last particle of the rope. I attached a photo that demonstrate what I want. Thanks in advance. RE: Question About Making Grappling Hook - josemendez - 15-04-2020 You can't "rotate" a rope whilst being simulated, it makes no sense at all. Deformable objects in general (not just ropes) cannot be transformed using a single matrix, as rotations are rigid transforms by definition: https://en.wikipedia.org/wiki/Rigid_transformation Even if you could rotate the entire rope, gravity would immediately make it point downwards again after rotating it... this approach is just not a good idea. I'd use external forces to coerce the rope particles (or at least the last particle) into moving towards the player. The solver has a externalForces array that you can write per-particle forces into, same as you would set velocities or positions. |