• Advertisement
Sign in to follow this  

Track Position in OpenGL ES

This topic is 1849 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have some models moving around a sphere using glRotate() and glTranslate() which all works how I want. Now I need to add collision detection. Each model has a bounding box and bounding sphere associated with it. How do I keep track of each models' position and apply that to the bounding box and bounding sphere so that I can test for collisions? I am using Java on Android, with the libGDX framework on OpenGL ES 1.1.

Share this post


Link to post
Share on other sites
Advertisement
I have some models moving around a sphere using glRotate() and glTranslate() which all works how I want. Now I need to add collision detection. Each model has a bounding box and bounding sphere associated with it. How do I keep track of each models' position and apply that to the bounding box and bounding sphere so that I can test for collisions? I am using Java on Android, with the libGDX framework on OpenGL ES 1.1.

There is another thread about this topic here 

 

http://www.gamedev.net/topic/300428-sphere-box-collision/

 

I hope it's useful.

Share this post


Link to post
Share on other sites

Thanks, that will definitely help when I get to the actual testing of collision detection. My problem right now is keeping track of the x, y, and z coordinates of the model after calls to glRotate() and glTranslate() which in turn need to transform the corresponding bounding box/sphere for that model. Right now, the drawing is working how I expect but I need a way to keep track of the position in the world.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement