Skip to content

Commit 25b8f05

Browse files
authored
Fix quat_look_rotation (#140)
1 parent 31cfe24 commit 25b8f05

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

movement/look_rotation/example/look_rotation.script

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@ local function quat_look_rotation(forward, upwards)
1111
return vmath.quat()
1212
end
1313

14-
-- Handle alignment with up direction
15-
if math.abs(vmath.dot(forward, upwards)) > 0.9999999 then
16-
return vmath.quat_from_to(vmath.vector3(0, 0, 1), forward)
17-
end
18-
1914
-- Create a rotation matrix from the forward and upwards vectors
2015
local matrix = vmath.matrix4_look_at(vmath.vector3(0), forward, upwards)
2116

0 commit comments

Comments
 (0)