fixed the friction calc

This commit is contained in:
Alexsandro Percy 2023-10-10 18:03:03 -03:00
parent c7e74ddaf7
commit 24fd569596

View File

@ -7,9 +7,9 @@ function automobiles_lib.physics(self)
-- dumb friction
if self.isonground and not self.isinliquid then
--minetest.chat_send_all('okay')
self.object:add_velocity({x=vel.x - vel.x*friction,
y=0,
z=vel.z - vel.z*friction})
self.object:add_velocity({x=vel.x*friction-vel.x,
y=vel.y,
z=vel.z*friction-vel.z})
end
-- bounciness