Adjust graphical offset by rotation to fix graphical position not exactly
the same as physicsl position when kart drives on wall.
This commit is contained in:
parent
76cf9ed141
commit
5eb447d3e6
@ -2540,6 +2540,8 @@ void Kart::updateGraphics(float dt, const Vec3& offset_xyz,
|
||||
|
||||
center_shift.setY(m_skidding->getGraphicalJumpOffset() + lean_height
|
||||
- m_kart_model->getLowestPoint() -chassis_delta );
|
||||
center_shift = getTrans().getBasis() * center_shift;
|
||||
|
||||
float heading = m_skidding->getVisualSkidRotation();
|
||||
Moveable::updateGraphics(dt, center_shift,
|
||||
btQuaternion(heading, 0, m_current_lean));
|
||||
|
Loading…
x
Reference in New Issue
Block a user