Create a sphere and detect touch event on the sphere

View previous topic View next topic Go down

Create a sphere and detect touch event on the sphere

Post  taxi4alex on Wed Jun 10, 2009 5:08 am

Hello,

I am looking for a way to create a sphere which simulate the earth with continents. This sphere can spin around axle and detect touch event on each "continent" (the continent will be highlighted with a different color).

Is it possible to implement this idea with SIO2 and Blender? Could anybody please help to give me a suggestion?

Thanks,

Alex

taxi4alex

Posts : 5
Join date : 2009-06-10

View user profile

Back to top Go down

Re: Create a sphere and detect touch event on the sphere

Post  sio2interactive on Wed Jun 10, 2009 5:18 pm

What I would do is model the earth etc... in blender and would implement and arc ball movement within the application.

Google on OpenGL arc ball you'll easily find some sample code.

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

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

View user profile http://sio2interactive.com

Back to top Go down

Re: Create a sphere and detect touch event on the sphere

Post  taxi4alex on Wed Jun 10, 2009 7:48 pm

Thanks sio2interactive for your kindly help Smile

BR,
Alex

taxi4alex

Posts : 5
Join date : 2009-06-10

View user profile

Back to top Go down

Re: Create a sphere and detect touch event on the sphere

Post  1sidetracked on Sat Jun 20, 2009 8:56 am

You should unmap the window coordinates (touch point) to object coordinates using inverse modelview and projection matrices.
After this you can look where these object coordinates lie on your sphere.

1sidetracked

Posts : 3
Join date : 2009-06-20

View user profile

Back to top Go down

Re: Create a sphere and detect touch event on the sphere

Post  sio2interactive on Sat Jun 20, 2009 5:10 pm

This is why sio2 contain sio2Project and sio2Unproject Wink

However they are quite heavy calculations, use it with care!

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

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

View user profile http://sio2interactive.com

Back to top Go down

Re: Create a sphere and detect touch event on the sphere

Post  Francescu on Sat Jun 20, 2009 5:16 pm

tutorial14 uses sio2Project and if you search (advanced search) in the forums, you will see examples of sio2UnProject used in Ray tracing logic...just FYI

Francescu

Posts : 136
Join date : 2009-03-18

View user profile

Back to top Go down

Re: Create a sphere and detect touch event on the sphere

Post  1sidetracked on Mon Jun 22, 2009 8:26 pm

I'm new to SIO2, so i was not aware of these functions.
I just know that OpenGL ES 1.X does not support them.
And yes, these are quite expensive. Even on desktop OpenGL.

some crawling Wink :
Everyday I'm learning more about your engine and everyday I'm more impressed of your work.

1sidetracked

Posts : 3
Join date : 2009-06-20

View user profile

Back to top Go down

Re: Create a sphere and detect touch event on the sphere

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

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