Create a sphere and detect touch event on the sphere
4 posters
Create a sphere and detect touch event on the sphere
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
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
Re: Create a sphere and detect touch event on the sphere
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.
Google on OpenGL arc ball you'll easily find some sample code.
Re: Create a sphere and detect touch event on the sphere
Thanks sio2interactive for your kindly help
BR,
Alex
BR,
Alex
taxi4alex- Posts : 5
Join date : 2009-06-10
Re: Create a sphere and detect touch event on the sphere
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.
After this you can look where these object coordinates lie on your sphere.
1sidetracked- Posts : 3
Join date : 2009-06-20
Re: Create a sphere and detect touch event on the sphere
This is why sio2 contain sio2Project and sio2Unproject
However they are quite heavy calculations, use it with care!
However they are quite heavy calculations, use it with care!
Re: Create a sphere and detect touch event on the sphere
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
Re: Create a sphere and detect touch event on the sphere
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 :
Everyday I'm learning more about your engine and everyday I'm more impressed of your work.
I just know that OpenGL ES 1.X does not support them.
And yes, these are quite expensive. Even on desktop OpenGL.
some crawling :
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
Similar topics
» create menu or interface with blender
» Texture for sphere can not be renderred on Simulator
» How to create an object which is always in front of the camera
» Programatically Creating Objects
» How to Create .sio2 file???
» Texture for sphere can not be renderred on Simulator
» How to create an object which is always in front of the camera
» Programatically Creating Objects
» How to Create .sio2 file???
Permissions in this forum:
You cannot reply to topics in this forum