walk adjusted to follow parent rotation too

This commit is contained in:
Alexsandro Percy 2024-02-25 17:44:40 -03:00
parent bd9729bbd7
commit 64230378a1

View File

@ -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()