Reputation: 3133
Currently, I have a mechanism to orient the view to standard orientation by modifying the model view matrix.
I would like to enhance the user experience by providing a smooth animation that will take the user from the current view orientation to the standard view orientation with a smooth transition -> (constant rate of change of direction).
The transition should ideally take less than 500 milliseconds.
I have the following already implemented.
I can extract the current view direction and I know the view direction of all standard views.
My questions:
Upvotes: 1
Views: 253
Reputation: 843
If you are already handling user input while rendering, there shouldn't be a need for a separate thread. If you want the user to still have control just don't let them control the view matrix directly - rather a target view matrix and simply nudge the current view matrix towards the target a part of the way each frame.
This will complicate the smooth acceleration/deceleration though - say, you start out with a small acceleration, build up speed, and then the user moves the camera: do you start again with a low speed, or do you continue with the same? This is a design decision, but I think the controls would feel weird if the speed the view rotated at changed midway. Also - if you have acceleration/deceleration the rate of change wouldn't be constant by definition, so you really need to decide what you want, possibly try both solutions and see if it "feels right" for a lack of a better phrase.
Upvotes: 2