Skip to content

Commit

Permalink
Fix type error in scene pointer example
Browse files Browse the repository at this point in the history
  • Loading branch information
brentyi committed Aug 23, 2024
1 parent cf4a794 commit 783ea09
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/20_scene_pointer.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def _(event: viser.ScenePointerEvent) -> None:
client.scene.remove_pointer_callback()

# Get the first hit position (based on distance from the ray origin).
hit_pos = min(hit_pos, key=lambda x: onp.linalg.norm(x - origin))
hit_pos = hit_pos[onp.argmin(onp.sum((hit_pos - origin) ** 2, axis=-1))]

# Create a sphere at the hit location.
hit_pos_mesh = trimesh.creation.icosphere(radius=0.1)
Expand Down

0 comments on commit 783ea09

Please sign in to comment.