Aiming targets without lookat
I need to make a targeting system that progressively aims some object in the space from a fixed point (pratically pointing stars in the sky from Earth).
Given 2 objects at different coordinates, I compute their angles on the XZ and YZ plane using Math.atan2(y1,x1). In this case I have no problem, even if some hints for using
aVector3d.angle(anotherVector3d) could be really appreciated.
My problem occurs when some rotation have been applied to the viewer axes, I cannot figure out how to obtain the local viewer Z axis respect to its world Z axis for calculating the angle between them.
Please, can you help me? Thanks
sorry for my poor English :)
Just for other people searching fast solutions, solved calculating heading, attitude and banking of the viewer. For more information see great documentation provided by Martin Baker on his website http://www.euclideanspace.com/
Message was edited by: fravalle