I am trying to a camera that moves using a spline. Camera position works nice however I want my camera eye to the turn itself while moving.
For example camera moves from x0 y0 z0 to x1 y1 z1. Now my eye vector is normal(x1-x0, y1-y0, z1-z0). How do I rotate other two vectors (side and up vector) to match eye vector and not destroying 90 degree angles between them?
If it is easier in yaw/pitch form it is fine too, I can convert between two. Or a different approach to what I want to achieve?
For example I think I can do it by calculating normal of the spline (it is a 3 point beizer curve) and each step I can calculate how much camera will rotate around that normal. But I would prefer an easier and a more general method, if it exists.
You can see what I am doing here. (click on a planet) In this one I convert my old and new eye vector to pitch/yaw and find the difference and rotate other vectors using this but this is obviously wrong since in some cases, other vectors may not change at all (if eye is rotating perpendicular to one)