Files
RCBASIC4/doc/files/createpulleyjoint.txt
n00b 2a580f9686 Finished documentation
Finished documentation on sprite physics and joints
Fixed some bugs in sprite physics
Added safety checks for joint types
Added code to free up joints when a canvas is destroyed
2024-10-28 22:22:33 -04:00

7 lines
634 B
Plaintext

#title createPulleyJoint [RCBasic Doc]
#header function createPulleyJoint( spriteA, spriteB, gaX, gaY, gbX, gbY, aX, aY, bX, bY, j_ratio, collide_connect)
Creates a pulley joint
The pulley joint is connected to two bodies and two fixed ground points. The pulley supports a ratio such that: length1 + ratio * length2 <= constant Yes, the force transmitted is scaled by the ratio. Warning: the pulley joint can get a bit squirrelly by itself. They often work better when combined with prismatic joints. You should also cover the the anchor points with static shapes to prevent one side from going to zero length.