From aac92f6111ad4d9770ba2687b8000a46c66d7b6f Mon Sep 17 00:00:00 2001 From: hiker Date: Fri, 10 Mar 2017 08:44:51 +1100 Subject: [PATCH] Code simplification. --- src/karts/cannon_animation.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/karts/cannon_animation.cpp b/src/karts/cannon_animation.cpp index 05b5bd95d..75c877039 100644 --- a/src/karts/cannon_animation.cpp +++ b/src/karts/cannon_animation.cpp @@ -123,12 +123,7 @@ CannonAnimation::~CannonAnimation() { delete m_curve; - btTransform pos; - pos.setOrigin(m_kart->getXYZ()); - //pos.setRotation(btQuaternion(btVector3(0.0f, 1.0f, 0.0f), - // m_kart->getHeading() )); - pos.setRotation(m_kart->getRotation()); - + btTransform pos = m_kart->getTrans(); m_kart->getBody()->setCenterOfMassTransform(pos); Vec3 v(0, 0, m_kart->getKartProperties()->getEngineMaxSpeed()); m_kart->setVelocity(pos.getBasis()*v);