fix: update damping in physics

github issue #15630
This commit is contained in:
Ricardo Quesada 2016-05-24 10:53:23 -03:00
parent 5daaa6e49b
commit 02a9c9aae3
1 changed files with 2 additions and 2 deletions

View File

@ -773,12 +773,12 @@ void PhysicsBody::setResting(bool rest) const
void PhysicsBody::update(float delta)
{
// damping compute
/*if (_isDamping && _dynamic && !isResting())
if (_isDamping && _dynamic && !isResting())
{
_cpBody->v.x *= cpfclamp(1.0f - delta * _linearDamping, 0.0f, 1.0f);
_cpBody->v.y *= cpfclamp(1.0f - delta * _linearDamping, 0.0f, 1.0f);
_cpBody->w *= cpfclamp(1.0f - delta * _angularDamping, 0.0f, 1.0f);
}*/
}
}
void PhysicsBody::setCategoryBitmask(int bitmask)