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 / AGK Unproject Function ?

Author
Message
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 3rd Nov 2012 07:41
I have tried several formulas to create an "unproject" function (to create a raycast and pick objects in 3D Space from 2D Screen coordinates) ... but without any success ...

Any idea ?
kamac
13
Years of Service
User Offline
Joined: 30th Nov 2010
Location: Poland
Posted: 3rd Nov 2012 11:07
Not sure if this command is there, but have you tried gluUnproject?

Follow me on twitter! @MotionStruct
Motion Struct blog
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 3rd Nov 2012 16:52
in Tier1 ???
kamac
13
Years of Service
User Offline
Joined: 30th Nov 2010
Location: Poland
Posted: 3rd Nov 2012 23:32 Edited at: 3rd Nov 2012 23:33
Ouch. It's tier 1.

Then, you could try and rip off GLM's unproject function, which looks like this:



That's some work to convert it to BASIC.
Not sure if it can work for you either.

Best option is if Paul could speak out here.

Follow me on twitter! @MotionStruct
Motion Struct blog
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 4th Nov 2012 00:31
I've added commands to convert between screen coordinates and 3D coordinates for the next version.
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 4th Nov 2012 04:55
Kamac : Thanks but i have already tried to convert the original function without a real success

Paul : Great news if you add this and Animated models support it will rocks (and the shaders problem fix on 1082b)

Login to post a reply

Server time is: 2024-11-24 01:42:29
Your offset time is: 2024-11-24 01:42:29