We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8e47384 commit 47bf4beCopy full SHA for 47bf4be
genesis/ext/pyrender/trackball.py
@@ -113,7 +113,7 @@ def drag(self, point):
113
if self._state == Trackball.STATE_ROTATE:
114
# Compute updated azimut directly. No fancy math here because this angle can controlled freely.
115
roll_angle = np.arctan2(self._pose[2, 1], self._pose[2, 2])
116
- world_up_axis = np.array([0.0, 0.0, np.sign(roll_angle)])
+ world_up_axis = np.array([0.0, 0.0, -1.0 if roll_angle < 0.0 else 1.0]) # safeguard for degenerate case when roll_angle = 0
117
azimuth_angle = -dx / mindim
118
azimuth_transform = transformations.rotation_matrix(azimuth_angle, world_up_axis, target)
119
0 commit comments