com.badlogic.gdx.physics.box2d.joints
Class PulleyJoint
java.lang.Object
com.badlogic.gdx.physics.box2d.Joint
com.badlogic.gdx.physics.box2d.joints.PulleyJoint
public class PulleyJoint
- extends 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. The pulley also enforces a maximum length limit on
both sides. This is useful to prevent one side of the pulley hitting the top.
PulleyJoint
public PulleyJoint(World world,
long addr)
getGroundAnchorA
public Vector2 getGroundAnchorA()
getGroundAnchorB
public Vector2 getGroundAnchorB()
getLength1
public float getLength1()
- Get the current length of the segment attached to body1.
getLength2
public float getLength2()
- Get the current length of the segment attached to body2.
getRatio
public float getRatio()
- Get the pulley ratio.
Copyright © 2013. All Rights Reserved.