Skip to content

Commit

Permalink
Bug Fix Loot At
Browse files Browse the repository at this point in the history
An attempt to help with google-research#197 google-research#198

Created a new function in Kubric core. set_position()

I hope this is helpful xD
  • Loading branch information
MrXandbadas committed May 26, 2022
1 parent 4bc6822 commit db73bc8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kubric/core/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ def __init__(self, position=(0., 0., 0.), quaternion=None,
up="Y", front="-Z", look_at=None, euler=None, **kwargs):
if look_at is not None:
assert quaternion is None and euler is None
self.lookat = look_at
quaternion = look_at_quat(position, look_at, up, front)
elif euler is not None:
assert look_at is None and quaternion is None
Expand All @@ -136,6 +137,7 @@ def __init__(self, position=(0., 0., 0.), quaternion=None,
def look_at(self, target):
self.quaternion = look_at_quat(self.position, target, self.up, self.front)


@property
def rotation_matrix(self):
""" Returns the rotation matrix corresponding to self.quaternion."""
Expand Down

0 comments on commit db73bc8

Please sign in to comment.