-
Notifications
You must be signed in to change notification settings - Fork 23
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
Support pan, rotate and zoom camera operations #108
Conversation
Hey thanks! I took a look at this and will get back to it more later. It mostly works but there are a few edge cases and issues to work out before merging. I'll go into more detail on a review later. |
835a478
to
05c1710
Compare
d0b7c4f
to
e4d5e01
Compare
@bschwind @tuna-f1sh I switched to use quartenion rotation and reversed the rotation orientation. PTAL 🙇 I could not figure out what is causing the clipping issue, though. The |
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.
@skywhale Hey Ryo, this is Máté! Just sharing some thoughts. Hope they'll help!
4a9c71e
to
2699bfa
Compare
2699bfa
to
2adb122
Compare
I'm going to commandeer this PR! ;) |
@bschwind I think this works reasonably well for now. Please try it out! ;) |
052bc51
to
9a3763b
Compare
Rebased onto latest |
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.
This is awesome, thanks so much for finishing this!
It functions almost exactly as I had imagined it would, very usable on a trackpad.
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.
Nice! I'll go ahead and make the change I suggested and merge it :)
crates/viewer/src/camera.rs
Outdated
let proj = Mat4::perspective_rh( | ||
std::f32::consts::PI / 2.0, | ||
self.aspect_ratio, | ||
10.0, |
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.
I played around a bit with this, I think 1.0
is a bit more comfortable for most of the models I tried.
Rotate and zoom is achieved by moving the camera instead of modifying the target object.
For #61