|
|
OK, the way I see it is that you need to take the atan2 of your _distance_
between the 2 points and the x or y value of the look_at
The key is that you need to take into account the x AND y variation of your
vector when you calculate the x and y angles. So use the whole vector length
in your atan2 function.
so, that would be something like
degrees(atan2(Vlength(LA-Cam), LA.x)) and degrees(atan2(Vlength(LA-Cam), LA.y))
or expanded:
degrees( atan2 ( sqrt( ((LA.x-Cam.x)^2)+((LA.y-Cam.y)^2)+((LA.z-Cam.z)^2) ),
LA.x ))
degrees( atan2 ( sqrt( ((LA.x-Cam.x)^2)+((LA.y-Cam.y)^2)+((LA.z-Cam.z)^2) ),
LA.y ))
(worked out in OpenOffice, so they _may_ some editing need (like the N^2
notation) )
Good luck, YMMV :D
Post a reply to this message
|
|