Correct feet position for rotated model

This commit is contained in:
SmallJoker 2017-10-27 12:51:26 +02:00
parent 6ac106c1a7
commit 9a2a2b9d69

@ -359,12 +359,12 @@ function cart_entity:on_step(dtime)
-- TODO: Find a better way to calculate this -- TODO: Find a better way to calculate this
if boost_cart.old_player_model then if boost_cart.old_player_model then
feet.y = 6 + 1.5 feet.y = 6 + 1.5
feet.z = (dir.x - dir.z) * 7 feet.z = -dir.y * 7
else else
feet.y = -4.2 + 3 feet.y = -4.2 + 3
feet.z = dir.x - dir.z feet.z = -dir.y
end end
eye.z = eye.z - dir.y * 10 eye.z = -dir.y * 10
end end
player:set_attach(self.object, "", feet, player:set_attach(self.object, "", feet,
{x=dir.y * -45, y=0, z=0}) {x=dir.y * -45, y=0, z=0})