프로퍼티 | 타입 | 설명 | |
---|---|---|---|
dampingRatio | float | ||
frequency | float | ||
length | float | ||
localAnchorA | Vector2 | ||
localAnchorB | Vector2 |
메소드 | 설명 | |
---|---|---|
DistanceJoint ( Body bodyA, Body bodyB, Vector2 anchorA, Vector2 anchorB, bool useWorldCoordinates = false ) : System |
This requires defining an anchor point on both bodies and the non-zero length of the distance joint. If you don't supply a length, the local anchor points is used so that the initial configuration can violate the constraint slightly. This helps when saving and loading a game. Warning Do not use a zero or short length.
|
|
getReactionForce ( float invDt ) : Vector2 |
Get the reaction force given the inverse time step. Unit is N.
|
|
getReactionTorque ( float invDt ) : float |
Get the reaction torque given the inverse time step. Unit is N*m. This is always zero for a distance joint.
|
메소드 | 설명 | |
---|---|---|
DistanceJoint ( ) : System | ||
initVelocityConstraints ( SolverData &data ) : void | ||
solvePositionConstraints ( SolverData &data ) : bool | ||
solveVelocityConstraints ( SolverData &data ) : void |
public DistanceJoint ( Body bodyA, Body bodyB, Vector2 anchorA, Vector2 anchorB, bool useWorldCoordinates = false ) : System | ||
bodyA | Body | The first body |
bodyB | Body | The second body |
anchorA | Vector2 | The first body anchor |
anchorB | Vector2 | The second body anchor |
useWorldCoordinates | bool | Set to true if you are using world coordinates as anchors. |
리턴 | System |