From 747aaf19815a5bcb6c103e718d400eb2ce0fcaa2 Mon Sep 17 00:00:00 2001 From: Allanis Date: Sat, 20 Jan 2018 18:14:59 +0000 Subject: [PATCH] [Add] Zero velocity and forces on landing. --- src/ship.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ship.cpp b/src/ship.cpp index e1efa72..1b4019e 100644 --- a/src/ship.cpp +++ b/src/ship.cpp @@ -163,6 +163,11 @@ void Ship::TestLanded(void) { rot = rot.InverseOf(); SetRotMatrix(rot); + dBodySetLinearVel(m_body, 0,0,0); + dBodySetAngularVel(m_body,0,0,0); + dBodySetForce(m_body,0,0,0); + dBodySetTorque(m_body,0,0,0); + /* * We don't use DynamicBody::Disable because that also disables * the geom, and that must still get collisions.