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 / 3D position to 2D position.

Author
Message
helpfull programmer
15
Years of Service
User Offline
Joined: 30th Jul 2009
Location:
Posted: 15th May 2010 19:54
Hi guys,
you are amazing!

Just a quicky, do you know how to change a 3D position to a 2D one.. E.G. (x,y,z) to (z,y) just like dbObjectScreenX() and dbObjectScreenY()... but instead of an object in a 3D space you find a point.

Thank you in advance!
from helpfullprogrammer.
bloodmage2
15
Years of Service
User Offline
Joined: 14th Jun 2009
Location:
Posted: 26th May 2010 18:37
well, i wont give you an exact formula, but the angle of the point is what you want. if you can find the angle, you can find where on the screen (or off) the point is. the x rotation is used for y, the y angle is used for x.

-to the optimist, the glass is half full. to the pessimist, it is half empty, to the engineer, it is twice as big as it needs to be.
http://www.lionsbloodstudios.justinman.net/index.htm
helpfull programmer
15
Years of Service
User Offline
Joined: 30th Jul 2009
Location:
Posted: 26th May 2010 19:15
ahhh!! that has given me an idea. thank you
haliop
User Banned
Posted: 26th May 2010 22:20
Quote: "Just a quicky, do you know how to change a 3D position to a 2D one.. E.G. (x,y,z) to (z,y) just like dbObjectScreenX() and dbObjectScreenY()... but instead of an object in a 3D space you find a point.
"


what point?
i dont understand the diffrence between this and dbObjectScreenX/Y..
what are you trying to find?
helpfull programmer
15
Years of Service
User Offline
Joined: 30th Jul 2009
Location:
Posted: 26th May 2010 23:15
Sorry for the confusion the diffrence is that I don't want to find a 3D objects position, but a specific 3D point.
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 27th May 2010 11:33

Login to post a reply

Server time is: 2024-11-19 16:57:12
Your offset time is: 2024-11-19 16:57:12