Sign in to follow this  
DiscGolfer17

Track Position in OpenGL ES

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this