C# Class Box2DX.Dynamics.DistanceJointDef

Distance joint definition. This requires defining an anchor point on both bodies and the non-zero length of the distance joint. The definition uses local anchor points 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.
Inheritance: JointDef
Exibir arquivo Open project: KrugerHeavyIndustries/box2d-unity Class Usage Examples

Public Properties

Property Type Description
DampingRatio float
FrequencyHz float
Length float
LocalAnchor1 System.Vector2
LocalAnchor2 System.Vector2

Public Methods

Method Description
DistanceJointDef ( ) : System
Initialize ( Body body1, Body body2, System.Vector2 anchor1, System.Vector2 anchor2 ) : void

Initialize the bodies, anchors, and length using the world anchors.

Method Details

DistanceJointDef() public method

public DistanceJointDef ( ) : System
return System

Initialize() public method

Initialize the bodies, anchors, and length using the world anchors.
public Initialize ( Body body1, Body body2, System.Vector2 anchor1, System.Vector2 anchor2 ) : void
body1 Body
body2 Body
anchor1 System.Vector2
anchor2 System.Vector2
return void

Property Details

DampingRatio public_oe property

The damping ratio. 0 = no damping, 1 = critical damping.
public float DampingRatio
return float

FrequencyHz public_oe property

The response speed.
public float FrequencyHz
return float

Length public_oe property

The equilibrium length between the anchor points.
public float Length
return float

LocalAnchor1 public_oe property

The local anchor point relative to body1's origin.
public Vector2,System LocalAnchor1
return System.Vector2

LocalAnchor2 public_oe property

The local anchor point relative to body2's origin.
public Vector2,System LocalAnchor2
return System.Vector2