Skip to content

Commit

Permalink
Fixed issue in kinematic.look_at() when id is provided
Browse files Browse the repository at this point in the history
  • Loading branch information
Björn Ritzl committed Nov 8, 2016
1 parent 43e63b5 commit 02fdd42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ludobits/m/kinematic.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function M.look_at(look_at_position, id)
local pos = go.get_world_position(id)
local target_angle = -math.atan2(look_at_position.x - pos.x, look_at_position.y - pos.y)
local target_quat = vmath.quat_rotation_z(target_angle)
go.set_rotation(target_quat)
go.set_rotation(target_quat, id)
end

--- Rotate around the z-axis
Expand Down

0 comments on commit 02fdd42

Please sign in to comment.