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

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

Introduction

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

Prototype

public void setFriction(float friction) 

Source Link

Document

Override the default friction mixture.

Usage

From source file:org.csproduction.descendant.B2D.GameContactListener.java

@Override
public void preSolve(Contact contact, Manifold oldManifold) {
    Vector2 normal = contact.getWorldManifold().getNormal();
    contact.resetFriction();/*from  www  .  j  a v a  2  s. c  o m*/
    if (normal.x != 0)
        contact.setFriction(0);
}