Get angle from object in 3D space


/ Published in: ActionScript 3
Save to your folder(s)

If you have multiple objects orbiting a 3D object and you want to determine the angle of a specific object, this will help you determine what rotationX you need to set your camera to if you want to be directly behind it.

Note: It works completely in 3d space. So if your Y, Z, X are not inversed or directly related to your comparison object, the angle will be a little off.

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.