I’m working on something where I’m trying to simulate a pulley lifting a rope (without using rigidbodies).
I’m trying to get the distance the bottom of the rope moves using the rotation of the pulley.
I’m no math whiz, and I’m having trouble figuring out the best way to calculate how far the circle rotated in order to life the bottom of the rope that same distance.
I’ve been trying to compare the difference between euler angles every frame, but that has been giving me strange results…
Of course it could be figured out. Not knowing the formula off the top of my head to, i would say i would mark the hieght, the rotate the gear once and see ow hi it has moved.
The circumference(distance around) is 2pi multiplied by twice the radius of your circle - for your purposes, 6.2 * the diameter of your circle would probably work. So if your circle has a diameter of one unit, each revolution of the circle you’ll need to lift your rope 6.2 units off the ground.
The circumference of the wheel of the pulley is given by 2pir. One complete rotation of the pulley results in a displacement of the rope’s end by 2pir. Therefor, the total displacement is numRotations * 2 * pi * r, where numRotations can be a fractional, ie if you have half a half a rotation, the rope end is displaced by pi * r.