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.

AppGameKit Classic Chat / how to get the ID of the X,Y picked object in 3D ?

Author
Message
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 11th Nov 2012 22:02 Edited at: 14th Nov 2012 17:29
Hello,

Not sure how to use the Get3DVectorXFromScreen,Get3DVectorYFromScreen,Get3DVectorZFromScreen functions ...

I have tried to cast the object between the normalized vector and the same vector*10 ... and between camera and vector*10 ... It seems it doesn't work ...

But i certainly make a mistake ...

any code to help ?
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 14th Nov 2012 17:28
up ?
Alpha Mike
14
Years of Service
User Offline
Joined: 22nd Aug 2010
Location: Bristol, UK
Posted: 17th Nov 2012 10:22
Did you ever figure this out?

I was mucking about with it last night.
Jimmanator
14
Years of Service
User Offline
Joined: 12th Nov 2010
Location:
Posted: 19th Nov 2012 00:58 Edited at: 19th Nov 2012 01:02
Do you mean like this,
it returns the x,y and z values of the surface of the cube
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 21st Nov 2012 01:40
Thanks Jimmanator,

i forgotten to add camera position in the "target" ray coords (...).

But for some reason i had to make some changes to get it working :



And then ... everything work as expected

Login to post a reply

Server time is: 2024-11-24 04:49:40
Your offset time is: 2024-11-24 04:49:40