From 64230378a10fda34de2bd074449d36111f8e6269 Mon Sep 17 00:00:00 2001 From: Alexsandro Percy Date: Sun, 25 Feb 2024 17:44:40 -0300 Subject: [PATCH] walk adjusted to follow parent rotation too --- walk_map.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/walk_map.lua b/walk_map.lua index 50b8a8a..7f3ac6d 100644 --- a/walk_map.lua +++ b/walk_map.lua @@ -178,6 +178,11 @@ local function get_result_pos(self, player, index) local direction = player:get_look_horizontal() local rotation = self.object:get_rotation() + local parent_obj = self.object:get_attach() + if parent_obj then + rotation = parent_obj:get_rotation() + end + direction = direction - rotation.y pos = vector.new()