Example usage for com.badlogic.gdx.physics.box2d Contact setTangentSpeed

List of usage examples for com.badlogic.gdx.physics.box2d Contact setTangentSpeed

Introduction

In this page you can find the example usage for com.badlogic.gdx.physics.box2d Contact setTangentSpeed.

Prototype

public void setTangentSpeed(float speed) 

Source Link

Usage

From source file:com.badlogic.gdx.tests.box2d.ConveyorBelt.java

License:Apache License

public void preSolve(Contact contact, Manifold oldManifold) {
    Fixture fixtureA = contact.getFixtureA();
    Fixture fixtureB = contact.getFixtureB();

    if (fixtureA == m_platform || fixtureB == m_platform) {
        contact.setTangentSpeed(5.0f);
    }// w w w .j av  a  2 s. c o m
}