From 24fd5695969509f7e8fb8eb0805bacfdce68e2ee Mon Sep 17 00:00:00 2001 From: Alexsandro Percy Date: Tue, 10 Oct 2023 18:03:03 -0300 Subject: [PATCH] fixed the friction calc --- automobiles_lib/custom_physics.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/automobiles_lib/custom_physics.lua b/automobiles_lib/custom_physics.lua index 72f09a8..ca44572 100755 --- a/automobiles_lib/custom_physics.lua +++ b/automobiles_lib/custom_physics.lua @@ -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