-
Notifications
You must be signed in to change notification settings - Fork 366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Focus on current bounding-box when resetting camera-eye on a 3D space view (double click it) #5209
Focus on current bounding-box when resetting camera-eye on a 3D space view (double click it) #5209
Conversation
…uses the current bounding box, not the accumulated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah makes more sense I think
// Mark as interaction since we want to stop doing any automatic interpolations, | ||
// even if this is caused by a full reset. | ||
self.last_eye_interaction = Some(Instant::now()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When tracking an entity (camera), reset_camera
is called each frame, I believe.
Won't resetting last_eye_interaction
each frame cause the center of the orbit camera to show up each frame?
Also, what does this have to do with the PR description?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, tracking works differently, there's a tracked_entity
for which there's special code how to handle that, in fact reset_camera sets tracked_entity
to None. The last eye interaction is set here to stop this snippet from operating https://github.com/rerun-io/rerun/blob/main/crates/re_space_view_spatial/src/ui_3d.rs#L113
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Originally I also wanted that thing
if self.last_eye_interaction.is_none() {
self.interpolate_to_orbit_eye(default_eye(
&bounding_boxes.accumulated,
scene_view_coordinates,
));
}
to use the current bounding box, but in many example scenes this looks too jerky
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
accumulated bounding box is pretty bad generally. If you spawned your objects at the origin and then transformed them where they should go, you always have the origin in your bounding box despite it being far off. There's no way for us to tell whether it's part of the scene or not
What
Bit back and forth on this: Originally also wanted to track the non-accumulated bounding box when data comes in, but for many scenes this gets too awkward.
Checklist
main
build: app.rerun.ionightly
build: app.rerun.io