From ab252a306de99b206356bc25367da83f9d55cea9 Mon Sep 17 00:00:00 2001 From: hiker Date: Sat, 4 Oct 2014 00:39:32 +1000 Subject: [PATCH] Try to avoid graphical kart chassis being partially in ground (still not perfect). --- src/karts/kart.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/karts/kart.cpp b/src/karts/kart.cpp index ee2ab1ac6..aee0d8b7c 100644 --- a/src/karts/kart.cpp +++ b/src/karts/kart.cpp @@ -2546,8 +2546,9 @@ void Kart::updateGraphics(float dt, const Vec3& offset_xyz, float lean_height = tan(fabsf(m_current_lean)) * getKartWidth()*0.5f; float heading = m_skidding->getVisualSkidRotation(); + float xx = fabsf(m_speed)* getKartProperties()->getDownwardImpulseFactor()*0.0006f; Vec3 center_shift = Vec3(0, m_skidding->getGraphicalJumpOffset() - + lean_height +m_graphical_y_offset, 0); + + lean_height +m_graphical_y_offset+xx, 0); center_shift = getTrans().getBasis() * center_shift; Moveable::updateGraphics(dt, center_shift,