Fix leaning value
This commit is contained in:
parent
94ad7ad676
commit
1ad20811b8
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user