Fix incorrect total rotation

master
Lars Mueller 2022-05-11 19:47:20 +02:00
parent e43b2c4752
commit d8e978243a
1 changed files with 1 additions and 1 deletions

View File

@ -235,7 +235,7 @@ function handle_player_animations(dtime, player)
local parent_rotation = attach_parent:get_rotation()
if attach_rotation and parent_rotation then
parent_rotation = vector.apply(parent_rotation, math.deg)
local total_rotation = normalize_rotation(vector.subtract(parent_rotation, attach_rotation))
local total_rotation = normalize_rotation(vector.add(parent_rotation, attach_rotation))
local function rotate_relative(euler_rotation)
-- HACK +180
euler_rotation.y = euler_rotation.y + look_horizontal + 180