Skip to content

Commit f1fb6cb

Browse files
committed
Bug: Camera pos crash if using ndarray type
1 parent 8977418 commit f1fb6cb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

demosys/scene/camera.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,12 @@ def look_at(self, vec=None, pos=None):
8383
:param pos: python list [x, y, x]
8484
:return: Camera matrix
8585
"""
86-
if pos:
86+
if pos is None:
8787
vec = Vector3(pos)
88+
8889
if vec is None:
8990
raise ValueError("vector or pos must be set")
91+
9092
return self._gl_look_at(self.position, vec, self._up)
9193

9294
def _gl_look_at(self, pos, target, up):

0 commit comments

Comments
 (0)