How to know the orientation of the rope ends - 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: How to know the orientation of the rope ends (/thread-3887.html) |
How to know the orientation of the rope ends - jayanaveenaa - 24-05-2023 Hii, Just started using obi rope to make shooting rope, in which a gameobject has a projectile motion and sticks to the wall upon collision. If you notice, all the ropes, end anchors and blueprints are duplicated. For some reason, with the vector input for force, each one of them are flying off to different direction. Is there any orientation issue or end points of rope affects the motion. If you can point out the issue it will great. RE: How to know the orientation of the rope ends - josemendez - 25-05-2023 (24-05-2023, 11:40 PM)jayanaveenaa Wrote: For some reason, with the vector input for force, each one of them are flying off to different direction. [/font][/size][/color] Hi there, How and where are you applying the force, (directly to rope particles, or to an object attached to them?) Could you share your code? (24-05-2023, 11:40 PM)jayanaveenaa Wrote: Is there any orientation issue or end points of rope affects the motion. If you can point out the issue it will great. Rope particles have no orientation, they're just points in space. Any force you add to them will be interpreted as-is, not reoriented to any particular direction. kind regards, RE: How to know the orientation of the rope ends - jayanaveenaa - 25-05-2023 (25-05-2023, 08:56 AM)josemendez Wrote: Hi there, I have attached a gameobejct tot eh rope' end using particle attachment condition and applied the force through that gameobject. private IEnumerator ThrowObjectWithDelay(float delay) { yield return new WaitForSeconds(delay); rb.isKinematic = false; Vector3 throwDirection = throwDirect.normalized; rb.AddForce(throwDirection * force, ForceMode.VelocityChange); isThrown = true; } private void FixedUpdate() { if (isThrown) { rb.AddForce(Vector3.down * gravity, ForceMode.Acceleration); } } RE: How to know the orientation of the rope ends - josemendez - 25-05-2023 (25-05-2023, 01:26 PM)jayanaveenaa Wrote: I have attached a gameobejct tot eh rope' end using particle attachment condition and applied the force through that gameobject. Hi, Is the attachment dynamic or static? Is the rope set to collide with the object it is attached to, and is it attached very close to or inside the object? Kind regards, RE: How to know the orientation of the rope ends - jayanaveenaa - 28-05-2023 (25-05-2023, 02:51 PM)josemendez Wrote: Hi, 1. The attachment is static 2. The sphere gameobject is placed close to the ends of the rope Is there any specific method/procedure to attach anchor Game objects at the ends? RE: How to know the orientation of the rope ends - josemendez - 28-05-2023 (28-05-2023, 12:33 AM)jayanaveenaa Wrote: 1. The attachment is static If the attachment is static, it won't be able to impart any forces on the game object it is attached to. However if the rope is very close to the gameobject and collisions between the rope of the object are enabled, the rope might be applying forces to the object because they're colliding against each other. This can result in random forces being added to the gameobject, deviating it from the trajectory it would have otherwise. This situation is described in the manual page for attachments, see "attachments inside colliders": http://obi.virtualmethodstudio.com/manual/6.3/attachments.html You can disable collisions either globally (in the ObiSolver component, under "constraints" foldout) or for specific particles/colliders, using collision filters. You can learn more about filters here: http://obi.virtualmethodstudio.com/manual/6.3/collisions.html (28-05-2023, 12:33 AM)jayanaveenaa Wrote: Is there any specific method/procedure to attach anchor Game objects at the ends? Not really, the ends are just like any other point in the rope. The procedure is exactly the same regardless of the point in the rope you attach the object to. let me know if you need further help, kind regards |