Fixed incorrect position for a rubber ball in a cannon.
This commit is contained in:
parent
bdbc7fd728
commit
91bad37939
@ -258,7 +258,7 @@ void CannonAnimation::update(float dt)
|
|||||||
if (gravity.length2() > 0)
|
if (gravity.length2() > 0)
|
||||||
gravity.normalize();
|
gravity.normalize();
|
||||||
else
|
else
|
||||||
gravity.setValue(0, -1, 0);
|
gravity.setValue(0, 1, 0);
|
||||||
// Adjust only 5% towards the real up vector. This will smoothly
|
// Adjust only 5% towards the real up vector. This will smoothly
|
||||||
// adjust the kart while the kart is in the air
|
// adjust the kart while the kart is in the air
|
||||||
Vec3 target_up_vector = (gravity*0.05f + up*0.95f).normalize();
|
Vec3 target_up_vector = (gravity*0.05f + up*0.95f).normalize();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user