-
-
Notifications
You must be signed in to change notification settings - Fork 253
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
Transition updateCameraUp #505
Comments
The function applyCameraUp triggers several calculations, as seen here: camera-controls/src/CameraControls.ts Lines 2475 to 2491 in cf39295
I am concerned that making it animatable within the tick function might lead to performance issues. What are your thoughts on this approach? |
I've also had some issues with this. For me it's mostly about updateCameraUp(). I use a six view system, where a view looking along each axis can be selected. Moving to a view that looks directly towards the previous camera up requires me to change the camera up so that camera orbiting does something useful. So I select a new camera up vector, do an updateCameraUp(), then perform a setLookAt() with a transition. On the surface, this is fine, as setLookAt only uses the new _yAxisUpSpace to set _sphericalEnd. But it seems the update() function also uses _yAxisUpSpace during the transition, even though the original orientation was built with the previous camera up value. So the transition "snaps" then moves. Not a biggie really, as I just don't use a transition if I change the camera's up value. Just mentioning it as it may not be such an obscure request as it may seem. Not sure of an easy solution to it though, given the update() function's reliance on _yAxisUpSpace. |
Is your feature request related to a problem? Please describe.
Unlike most other modifications of the camera,
updateCameraUp
andapplyCameraUp
don't offer a variable to transition. As a result, updates tocamera.up
are immediate, rather than transitioned. It would be nicer to have a transition.Describe the solution you'd like
The API chagnes to
updateCameraUp(enableTransition?)
andapplyCameraUp(enableTransition?)
, much likerotate
anddolly
and all the rest.Describe alternatives you've considered
I've animated this manually, but it's a pain, and the end didn't quite work right, though that may be due to the data I was working with.
Additional context
No response
The text was updated successfully, but these errors were encountered: