Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Physically accurate closed pulley system
#1
I would like to make a physically accurate closed pulley system with 2 pulleys and one closed rope.
All physics and colliders are working except that I cannot get the rope to react to the pulley rotation.
Is this even possible with Obi Rope and/or how should I approach this?

[Image: 1ii445dNDDSzaQWcR00kG_scJbCijUBoMfrU2AW4...17-h337-no]
Reply
#2
(08-01-2018, 12:18 PM)M. Hanssen Wrote: I would like to make a physically accurate closed pulley system with 2 pulleys and one closed rope.
All physics and colliders are working except that I cannot get the rope to react to the pulley rotation.
Is this even possible with Obi Rope and/or how should I approach this?

[Image: 1ii445dNDDSzaQWcR00kG_scJbCijUBoMfrU2AW4...17-h337-no]

Hi there! I'll try my best to help with this.

First of all, make sure the rope collision material or the pulleys collision material have a friction coefficient larger than zero. This is unlikely to be problem, though.

The pulleys interact with the rope trough friction, which is a physical property. Because of this, the pulleys must also be included in the simulation.

If the pulleys are not rigidbodies (that is, they have no physical properties like velocity, mass, etc) and you're rotating them using transform.Rotate() or transform.rotation = something (which is quite possibly what you're doing), you're not actually rotating anything in the physical sense of the word. You're actually "teleporting" them, so to speak: they disappear, and reappear in a different orientation every frame. However there's no angular velocity to them, and therefore no frictional forces involved.

This is a common misconception when it comes to physics, and happens to all physics engines: translating, rotating or scaling an object using its transform does not affect any physical property: linear velocity, angular velocity, acceleration, friction, restitution, etc.

Even if you turn your pulleys into rigidbodies, if you then simply change their transform's rotation you're not changing their angular velocity. To increase their angular velocity, you need to apply a torque or a linear force misaligned with their center of mass.

The solutions: either turn the pulleys into rigidbodies and rotate them by applying torques (by far the most straightforward fix), or if you reeeeeally can't afford them to be rigidbodies, derive an angular velocity yourself based on delta quaternions (that is, the difference between the previous frame rotation and the current divided by the delta time). This second solution is slightly more involved though. There's an example of it (using linear instead of angular velocities) in Obi/SampleScenes/SampleResources/Scripts/ObjectDragger.cs.
Reply
#3
Although I'm not a Unity rookie, this phenomenon was completely unknown to me.
Thanks a lot for your correct answer!
Reply
#4
(15-01-2018, 10:54 AM)M. Hanssen Wrote: Although I'm not a Unity rookie, this phenomenon was completely unknown to me.
Thanks a lot for your correct answer!

You're welcome! Sonrisa
Reply