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 / Coordenates Position

Author
Message
tmd13
15
Years of Service
User Offline
Joined: 16th Sep 2009
Location:
Posted: 28th Sep 2009 01:37
I would like to know how can I get the coordinates position by just making a click in the terrain or any area in my 3D World in Dark GDK.

My idea is whenever I click in an area be able to know what is the coordinates (x,y,z).


Thanks in advance
luke810
18
Years of Service
User Offline
Joined: 4th Sep 2006
Location: United States
Posted: 28th Sep 2009 02:34
Check out the documentation:

int dbPickObject( int iX, int iY, int iObjectStart, int iObjectEnd )
void dbPickScreen ( int iX, int iY, float fDistance )
float dbGetPickDistance ( void )
float dbGetPickVectorX ( void )
float dbGetPickVectorY ( void )
float dbGetPickVectorZ ( void )

The pick object command will get the collision point for an object between iObjectStart and iObjectEnd , after which you can get the coordinates using the dbGetPickVector commands.

tmd13
15
Years of Service
User Offline
Joined: 16th Sep 2009
Location:
Posted: 28th Sep 2009 03:09
Can you please give me an example because I could not follow you.

Login to post a reply

Server time is: 2024-10-01 14:34:10
Your offset time is: 2024-10-01 14:34:10