PDA

View Full Version : Getting object position in screen coordinates


v-Salik
10-19-2007, 03:38 PM
I have a user moving an avatar from the 3rd person view (moving arms/hands).
I want to check if the avatars hand is 'on top' of an on object from the view of the user, is there a way to get the projection transformation matrix and apply that to the object positions to get the screen coordinates of both objects then compare them?

THanks
-Salik

farshizzo
10-19-2007, 03:41 PM
Search the documentation for "worldToScreen", there should be a few examples showing how to convert a 3d location to a 2d location.