Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Getting Rope Orientation
#1
Hello,

So I have a scene with 4 ropes attached to a body as shown in the image ("scene.png").
   

When I move one rope to get the attached object on the sides, all the ropes do move, however their orientation stays the same as at the start, see image ("rope_orientation.png").
   

I would like to get/change the orientation of the rope co-ordinate system so that it matches the rope direction.

I want this to resolve the issue of rope slipping through pulley ("pulley_orientation.png").
   

The idea is to change/match the pulley orientation same as the rope orientation.

Anyone have any idea on how to achieve this?

Thank You.

Kind Regards.
Reply
#2
(30-11-2022, 12:09 PM)rohit_dhak Wrote: I would like to get/change the orientation of the rope co-ordinate system so that it matches the rope direction.

Hi!

The rope coordinate system does not affect the simulation in any way, in particular, changing it won't rotate the rope or give any information about the rope's orientation. It just determines the vector space in which the rope is initially generated.

(30-11-2022, 12:09 PM)rohit_dhak Wrote: I want this to resolve the issue of rope slipping through pulley ("pulley_orientation.png").

This would not resolve the slipping issue: as I already indicated you trough email you need to use proper collision geometry for the pulleys, instead of a BoxCollider. A cylinder with topped sides would be the best approach. You have an example of this in the "Crane" sample scene.

(30-11-2022, 12:09 PM)rohit_dhak Wrote: The idea is to change/match the pulley orientation same as the rope orientation.

A very simple way of achieving this is to get the vector that goes from the pulley to the attachment point of the rope, then use Quaternion.LookRotation().

kind regards,
Reply
#3
(30-11-2022, 01:10 PM)Thank you for your reply. Wrote:
Quote:"The rope coordinate system does not affect the simulation in any way, in particular, changing it won't rotate the rope or give any information about the rope's orientation. It just determines the vector space in which the rope is initially generated."

Thank you for the above information.


Quote:"This would not resolve the slipping issue: as I already indicated you trough email you need to use proper collision geometry for the pulleys, instead of a BoxCollider. A cylinder with topped sides would be the best approach. You have an example of this in the "Crane" sample scene."

The idea actually is not to resolve the issue, b ut rather than replicate the real system we have, In which the pulley moves freely according to the rope direction.


Quote:A very simple way of achieving this is to get the vector that goes from the pulley to the attachment point of the rope, then use Quaternion.LookRotation().

This idea sounds it would get the work done, will try it.

Thank you again.
Reply
#4
Quote:The idea actually is not to resolve the issue, b ut rather than replicate the real system we have, In which the pulley moves freely according to the rope direction.

In that case using a joint will allow the pulley to rotate freely in the vertical axis, this might be a better approach than kinematically forcing the orientation using Quaternion.LookAt. See: https://docs.unity3d.com/Manual/class-HingeJoint.html

kind regards,
Reply