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

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

Introduction

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

Prototype

public void resetFriction() 

Source Link

Document

Reset the friction mixture to the default value.

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();
    if (normal.x != 0)
        contact.setFriction(0);/*  ww  w . j ava  2  s.  c  o  m*/
}