mirror of
https://github.com/APercy/ap_airship.git
synced 2025-03-14 23:41:21 +00:00
walk adjusted to follow parent rotation too
This commit is contained in:
parent
bd9729bbd7
commit
64230378a1
1 changed files with 5 additions and 0 deletions
|
@ -178,6 +178,11 @@ local function get_result_pos(self, player, index)
|
||||||
|
|
||||||
local direction = player:get_look_horizontal()
|
local direction = player:get_look_horizontal()
|
||||||
local rotation = self.object:get_rotation()
|
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
|
direction = direction - rotation.y
|
||||||
|
|
||||||
pos = vector.new()
|
pos = vector.new()
|
||||||
|
|
Loading…
Add table
Reference in a new issue