Reference

setDamping()

Description

Damping is the effect of "air" on a body. The more damping you have, the more energy lost you will get, resulting in an impression resistance to the gravity effect. Use this function to adjust the damping of a body, wich will make it fall faster or slower.

Exemples

PPBox myBox = new PPBox(20, 30);
myBox.setDamping(5);
world.add(myBox);

Syntax

myBody.setDamping(damping);

Parameters

damping ->

float : The intensity of damping (higher mean more energy retains).