Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / 2D coordinates of a 3D object (Help)

Author
Message
Moops
14
Years of Service
User Offline
Joined: 19th Apr 2010
Location:
Posted: 10th May 2010 20:04
Hiya Guys,

hope you can help me, I'm trying to place a small health bar above a 3d object, I'm wanting to place a stretched sprite above the 3D object but have no way to calculate the screen position from the 3D object position, or should I say this is what I need help with, how to get a 2D coordinates from a 3D object coordinates.

Here is my current code of which I know doesn't work as the X and Y of dbObjectPosition are 3D coordinates, but this ight give you a better understanding of what im trying to achieve.



cheers

Moops
Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 10th May 2010 20:32
dbObjectScreenX/Y


also, you probably want to increase the y amount to be "over" the object, not on it

Moops
14
Years of Service
User Offline
Joined: 19th Apr 2010
Location:
Posted: 12th May 2010 13:23
spot on thank you.

Login to post a reply

Server time is: 2024-11-19 23:38:50
Your offset time is: 2024-11-19 23:38:50