Projecting Rays from screen(frustum) to select objects

Go down

Projecting Rays from screen(frustum) to select objects Empty Projecting Rays from screen(frustum) to select objects

Post  evrenbingol on Tue Jul 14, 2009 3:12 am

What is the best way to select characters(objects).
Usually one can project a ray from frustum. Is this possible with this sdk?

evrenbingol

Posts : 7
Join date : 2009-07-12

Back to top Go down

Projecting Rays from screen(frustum) to select objects Empty Already answered...

Post  goldfrapp0x0309 on Tue Jul 14, 2009 3:29 am

Yes, you can pick. Question already answered. Please search forum.
goldfrapp0x0309
goldfrapp0x0309

Posts : 43
Join date : 2009-02-28

Back to top Go down

Projecting Rays from screen(frustum) to select objects Empty Re: Projecting Rays from screen(frustum) to select objects

Post  sio2interactive on Tue Jul 14, 2009 6:34 am

4 choices:

1. Color picking (default SIO2 method which is optimal for iPhone)

2. Physic Picking (true ray cast in 3D)

3. sio2Project / sio2Unproject (depending on what exactly you want to do)

4. Implement your own picking method similar (check the Mesa source for the way GLU is doing it)

5. ?????

_________________
SIO2 Interactive
Free Open Source 3D Game Engine for iPhone and iPod Touch
http://sio2interactive.com
sio2interactive
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 40
Location : Shanghai

http://sio2interactive.com

Back to top Go down

Projecting Rays from screen(frustum) to select objects Empty Re: Projecting Rays from screen(frustum) to select objects

Post  evrenbingol on Tue Jul 21, 2009 5:43 am

Ok I want to get the X,Y,Z coordinate of a plane so that I can send an agent to that location, ideally i wanna find the node closes to that position and initiate an A*.

So I am guessing ray casting would be expensive. I would like to not use bullet if possible. What are my options.

Also why am I getting _SIO2transform->dir always zero.
I print out the x,y,x values after rotation and transformation but still i get zeros for direction.
And does the direction represent the facing vector? Or if not what does it represent.

Thanks for the feedbacks by the way. More I dig into the sdk the more I enjoy it.

evrenbingol

Posts : 7
Join date : 2009-07-12

Back to top Go down

Projecting Rays from screen(frustum) to select objects Empty Re: Projecting Rays from screen(frustum) to select objects

Post  sio2interactive on Tue Jul 21, 2009 6:02 pm

Ray casting is not that expensive if you don't have too many...

_________________
SIO2 Interactive
Free Open Source 3D Game Engine for iPhone and iPod Touch
http://sio2interactive.com
sio2interactive
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 40
Location : Shanghai

http://sio2interactive.com

Back to top Go down

Projecting Rays from screen(frustum) to select objects Empty Re: Projecting Rays from screen(frustum) to select objects

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum