From a666dcbac40fae2283cede503a013a51b1510cba Mon Sep 17 00:00:00 2001 From: Dave Schuyler Date: Thu, 29 Apr 2004 01:31:05 +0000 Subject: [PATCH] changed how the contact vector gets calculated --- panda/src/collide/collisionHandlerGravity.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/panda/src/collide/collisionHandlerGravity.cxx b/panda/src/collide/collisionHandlerGravity.cxx index 7ea4aec803..70054d2426 100755 --- a/panda/src/collide/collisionHandlerGravity.cxx +++ b/panda/src/collide/collisionHandlerGravity.cxx @@ -187,11 +187,11 @@ set_highest_collision(const NodePath &target_node_path, const NodePath &from_nod // is colliding with relative to the avatar. A positive y valye means // the avatar is facing downhill and a negative y value means the // avatar is facing uphill. - _contact_normal = DCAST(CollisionPlane, highest->get_into())->get_normal() * from_node_path.get_mat(highest->get_into_node_path()); + //_contact_normal = DCAST(CollisionPlane, highest->get_into())->get_normal() * from_node_path.get_mat(highest->get_into_node_path()); //_contact_normal = DCAST(CollisionPlane, highest->get_into())->get_normal(); // This is asking: what is the normal of the avatar that the avatar // is colliding with relative to the plane. - //_contact_normal = DCAST(CollisionPlane, highest->get_into())->get_normal() * highest->get_into_node_path().get_mat(from_node_path); + _contact_normal = DCAST(CollisionPlane, highest->get_into())->get_normal() * highest->get_into_node_path().get_mat(from_node_path); } else { _contact_normal = highest->get_surface_normal(from_node_path); } @@ -286,6 +286,7 @@ handle_entries() { apply_linear_force(def, LVector3f(0.0f, 0.0f, adjust)); } else { + // _impact_velocity = _current_velocity; _current_velocity = _airborne_height = 0.0f; if (collide_cat.is_spam()) { collide_cat.spam()