Skip to content

Commit 49895c4

Browse files
committed
fix horizontal rotation direction
1 parent 78788e3 commit 49895c4

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

modes/basic.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@ local function handler(pos, node, player, pointed, stack)
2424
local dir = minetest.yaw_to_dir(player:get_look_horizontal())
2525
if math.abs(dir.x) > math.abs(dir.z) then
2626
axis = "z"
27+
direction = math.sign(dir.x) * direction
2728
else
2829
axis = "x"
30+
direction = math.sign(dir.z) * direction * -1
2931
end
3032
end
3133
if pt == "facedir" or pt == "colorfacedir" then

0 commit comments

Comments
 (0)