Skip to content

Commit

Permalink
track only cameras
Browse files Browse the repository at this point in the history
  • Loading branch information
Wumpf committed Jan 12, 2024
1 parent 7e608d2 commit 86ddf0d
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions crates/re_space_view_spatial/src/ui_3d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -533,9 +533,19 @@ pub fn view_3d(
}
}
} {
state
.state_3d
.track_entity(entity_path, &state.bounding_boxes, space_cameras);
// For the moment we only track cameras.
// We have everything in place to track arbitrary objects but it's a bit odd sometimes, so only focus on them instead.
if space_cameras.iter().any(|c| &c.ent_path == entity_path) {
state
.state_3d
.track_entity(entity_path, &state.bounding_boxes, space_cameras);
} else {
state.state_3d.interpolate_eye_to_entity(
entity_path,
&state.bounding_boxes,
space_cameras,
);
}
ui.ctx().request_repaint(); // Make sure interpolation happens in the next frames.
}
}
Expand Down

0 comments on commit 86ddf0d

Please sign in to comment.