Applying screen space measurements to 3D

Started by
-1 comments, last by Denzin 13 years ago
I am currently working on a project, in which projectiles are fired based on where two dimensional textures are placed in relation to the character in the 3D environment, however am having an issue getting the projectile particle effect to rotate to emit in the correct direction.

First, a texture is placed. When this happens I am converting the player to screen coordinates and am left with 2 2D vectors.
I can get the angle of these vectors however it does not re apply to the 3D environment since the camera can be turned in any specific direction around the player so axis will not be aligned.

Is there any efficient technique to accomplish accounting for the camera's orientation on the axis so I can calculate the quaternion needed to be applied to go from the player's forward vector to the angle represented in 2D space?

This topic is closed to new replies.

Advertisement