diff --git a/panda/src/physics/physicsCollisionHandler.cxx b/panda/src/physics/physicsCollisionHandler.cxx index 0108322c3d..95fb6dbb3e 100755 --- a/panda/src/physics/physicsCollisionHandler.cxx +++ b/panda/src/physics/physicsCollisionHandler.cxx @@ -60,9 +60,12 @@ apply_linear_force(ColliderDef &def, const LVector3f &force) { } ActorNode *actor=DCAST(ActorNode, def._node); LVector3f vel=actor->get_physics_object()->get_velocity(); + if (vel == LVector3f::zero()) { + return; + } physics_debug("apply_linear_force() {"); - physics_debug(" vel "<0.0f) { + if (angle>0.0f) { physics_debug(" positive contact"); adjustment*=adjustmentLength; physics_debug(" adjustment mul "<get_physics_object()->get_implicit_velocity(); - physics_debug(" implicitVel "<=0.0f && friction<=1.0f); + #if 0 + float dt=ClockObject::get_global_clock()->get_dt(); + vel *= (1.0f-friction) * dt * dt; + #else + vel *= 1.0f-friction; + #endif + physics_debug(" vel post friction "<