do not zero small velocities for non-bullet case

This commit is contained in:
Andrew Meadows 2015-01-05 12:01:09 -08:00
parent 21b2d14956
commit bf6b8f9ca7

View file

@ -714,10 +714,12 @@ void EntityItem::simulate(const quint64& now) {
if (position.y <= getDistanceToBottomOfEntity()) {
velocity = velocity * glm::vec3(1,-1,1);
// if we've slowed considerably, then just stop moving
#ifndef USE_BULLET_PHYSICS
// if we've slowed considerably, then just stop moving, but only if no BULLET
if (glm::length(velocity) <= EPSILON_VELOCITY_LENGTH) {
velocity = NO_VELOCITY;
}
#endif // !USE_BULLET_PHYSICS
position.y = getDistanceToBottomOfEntity();
}