Code simplification.

This commit is contained in:
hiker 2017-03-10 08:44:51 +11:00
parent 5640436aa8
commit aac92f6111

View File

@ -123,12 +123,7 @@ CannonAnimation::~CannonAnimation()
{ {
delete m_curve; delete m_curve;
btTransform pos; btTransform pos = m_kart->getTrans();
pos.setOrigin(m_kart->getXYZ());
//pos.setRotation(btQuaternion(btVector3(0.0f, 1.0f, 0.0f),
// m_kart->getHeading() ));
pos.setRotation(m_kart->getRotation());
m_kart->getBody()->setCenterOfMassTransform(pos); m_kart->getBody()->setCenterOfMassTransform(pos);
Vec3 v(0, 0, m_kart->getKartProperties()->getEngineMaxSpeed()); Vec3 v(0, 0, m_kart->getKartProperties()->getEngineMaxSpeed());
m_kart->setVelocity(pos.getBasis()*v); m_kart->setVelocity(pos.getBasis()*v);