hmmmm maybe I should re-think my camera positioning to be locked to direction facing and the user then can offset camera to their choice and when timeout occurs the camera returns to object facing direction instead of motion direction.
But I will still need the equation for when the user selects look in direction of motion. I think I will try and do the messy version till I can find a decent equation for this. Which would be working out a sin and cos equation for each quadrant of direction on the x,y,z graph (4 quad) and see where that takes me. Take a normal of the target and look at that. hmmm
or maybe if i can project direction from velocity on x,y,z and take a normal of that.. err..
1. Mesh is not facing direction of motion
2. Mesh x,y,z is known
3. Velocity on x,y,z is known
Calculate normal based velocity and mesh x,y,z.
Ok, time to break out the pen, paper and the desktop calculator…
Googling lots of stuff… These test projects are flying out lol
Number crunching