Fix leaning value

This commit is contained in:
Benau 2016-04-28 08:23:50 +08:00
parent 94ad7ad676
commit 1ad20811b8

View File

@ -883,11 +883,11 @@ void KartModel::update(float dt, float distance, float steer, float speed,
// higher in the ground so that the wheel still touch the ground.
if(current_lean_angle > 0 && (i&1) == 0) // i&1 == 0: left side
{
pos.Y -= current_lean_angle;
pos.Y -= 2*current_lean_angle;
}
else if (current_lean_angle < 0 && (i&1) == 1) // i&1 == 1: right side
{
pos.Y += current_lean_angle;
pos.Y += 2*current_lean_angle;
}
m_wheel_node[i]->setPosition(pos);