Fix orientation of carts on slopes

This commit is contained in:
teknomunk 2024-12-28 18:34:27 -06:00 committed by the-real-herowl
parent e28b55c16a
commit 6559bc23f9

View file

@ -469,9 +469,9 @@ function mod.update_cart_orientation(self)
-- Forward/backwards tilt (pitch)
if dir.y > 0 then
rot.x = -_quart_pi
elseif dir.y < 0 then
rot.x = _quart_pi
elseif dir.y < 0 then
rot.x = -_quart_pi
else
rot.x = 0
end
@ -479,9 +479,6 @@ function mod.update_cart_orientation(self)
if ( staticdata.rot_adjust or 0 ) < 0.01 then
rot.x = -rot.x
end
if dir.z ~= 0 then
rot.x = -rot.x
end
rot.y = (rot.y + _half_pi) % _2_pi
self.object:set_rotation(rot)