Skip to content

Commit

Permalink
Revert "bug fix w.r.t. lookat (google-research#198)"
Browse files Browse the repository at this point in the history
This reverts commit a3d5eaa.
This is because on the new blender 3.1.2, with this patch applied,
the camera is rotated with its up side pointing to the right.
  • Loading branch information
gabriel-v committed Apr 20, 2022
1 parent 75adf78 commit 1544a85
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kubric/core/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ def look_at_quat(

# construct the desired coordinate basis front, right, up
look_at_front = normalize(target - position)
look_at_right = normalize(np.cross(up, look_at_front), fallback=world_right)
look_at_up = normalize(np.cross(look_at_front, look_at_right), fallback=world_up)
look_at_right = normalize(np.cross(world_up, look_at_front), fallback=world_right)
look_at_up = normalize(np.cross(look_at_front, look_at_right))

rotation_matrix1 = np.stack([look_at_right, look_at_up, look_at_front])
rotation_matrix2 = np.stack([right, up, front])
Expand Down

0 comments on commit 1544a85

Please sign in to comment.