Made death animation quicker.

This commit is contained in:
Steffen Fündgens 2015-03-06 17:55:01 +01:00
parent 7d480d654f
commit f38d57bb70

View File

@ -79,7 +79,7 @@ void Physics::takeUpdateStep(float timeDiff)
if(sinking) if(sinking)
{ {
btVector3 currentPos = playerBall->getCenterOfMassPosition(); btVector3 currentPos = playerBall->getCenterOfMassPosition();
currentPos -= btVector3(0,0.005f,0); currentPos -= btVector3(0,0.35f*timeDiff,0);
playerBall->setCenterOfMassTransform(btTransform(playerBall->getOrientation(),currentPos)); playerBall->setCenterOfMassTransform(btTransform(playerBall->getOrientation(),currentPos));
if(playerBall->getCenterOfMassPosition().y() < resetHight - 1.5f) if(playerBall->getCenterOfMassPosition().y() < resetHight - 1.5f)
{ {
@ -95,7 +95,7 @@ void Physics::takeUpdateStep(float timeDiff)
else else
{ {
btVector3 currentPos = playerBall->getCenterOfMassPosition(); btVector3 currentPos = playerBall->getCenterOfMassPosition();
currentPos += btVector3(0,0.009f,0); currentPos += btVector3(0,0.9f*timeDiff,0);
playerBall->setCenterOfMassTransform(btTransform(playerBall->getOrientation(),currentPos)); playerBall->setCenterOfMassTransform(btTransform(playerBall->getOrientation(),currentPos));
if(playerBall->getCenterOfMassPosition().y() >= startPosition.y() + 1) if(playerBall->getCenterOfMassPosition().y() >= startPosition.y() + 1)