APIdia Launch Partner
Top Description Fields Constructors
com.badlogic.gdx.physics.box2d.joints

public Class RopeJointDef

extends JointDef
Class Inheritance
Imports
com.badlogic.gdx.math.Vector2, com.badlogic.gdx.physics.box2d.JointDef

Rope joint definition. This requires two body anchor points and a maximum lengths.

Note

by default the connected objects will not collide. see collideConnected in b2JointDef.

Author
mzechner

Field Summary

Modifier and TypeField and Description
public final Vector2
localAnchorA

The local anchor point relative to bodyA's origin.

public final Vector2
localAnchorB

The local anchor point relative to bodyB's origin.

public float
maxLength

The maximum length of the rope.

Inherited from com.badlogic.gdx.physics.box2d.JointDef:
bodyAbodyBcollideConnectedtype

Constructor Summary

AccessConstructor and Description
public

Field Detail

localAnchorAback to summary
public final Vector2 localAnchorA

The local anchor point relative to bodyA's origin.

localAnchorBback to summary
public final Vector2 localAnchorB

The local anchor point relative to bodyB's origin.

maxLengthback to summary
public float maxLength

The maximum length of the rope.

Warning

this must be larger than b2_linearSlop or the joint will have no effect.

Constructor Detail

RopeJointDefback to summary
public RopeJointDef()