FORUM CLOSED, PLEASE REGISTER AT FORUM.SIO2INTERACTIVE.COM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Projecting Rays from screen(frustum) to select objects

3 posters

Go down

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

Post  evrenbingol 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 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 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. ?????
sio2interactive
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 45
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 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 Tue Jul 21, 2009 6:02 pm

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

Posts : 1526
Join date : 2008-08-26
Age : 45
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

- Similar topics

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