diff --git a/api.lua b/api.lua index aa8e960..a1ec12b 100644 --- a/api.lua +++ b/api.lua @@ -229,6 +229,8 @@ function vehicles.object_drive(entity, dtime, def) else entity.object:setyaw(target_yaw) end + dir.x = -math.sin(entity_yaw) + dir.z = math.cos(entity_yaw) else --minetest.chat_send_all("yaw:"..entity_yaw) --minetest.chat_send_all("dirx: "..dir.x.." dirz:"..dir.z) diff --git a/init.lua b/init.lua index 3518a76..1f208b8 100644 --- a/init.lua +++ b/init.lua @@ -1478,7 +1478,7 @@ minetest.register_entity("vehicles:apache", { hp_max = 200, animation_speed = 5, physical = true, - collisionbox = {-1.7, 0, -1.7, 1.7, 0.9, 1.7}, + collisionbox = {-1.8, 0, -1.8, 1.8, 1.5, 1.8}, on_rightclick = function(self, clicker) if self.driver and clicker == self.driver then vehicles.object_detach(self, clicker, {x=1, y=0, z=1})