Example usage for com.badlogic.gdx.physics.box2d.joints DistanceJoint setLength

List of usage examples for com.badlogic.gdx.physics.box2d.joints DistanceJoint setLength

Introduction

In this page you can find the example usage for com.badlogic.gdx.physics.box2d.joints DistanceJoint setLength.

Prototype

public void setLength(float length) 

Source Link

Document

Set/get the natural length.

Usage

From source file:edu.lehigh.cse.lol.Actor.java

License:Open Source License

/**
 * Modify an existing distance joint by changing the distance between the actors
 * //  www . j  a va2 s .  c o  m
 * @param newDist The new distance between the actors involved in the joint
 */
public void setDistance(float newDist) {
    DistanceJoint dj = (DistanceJoint) mDistJoint;
    dj.setLength(newDist);
}