Colision Detection

Hi,

I would like to know how i can detect the colision with a character and my world.

Is there a way to know the colision between a ray and the world in opengl ? If that’s possible i could add a ray on the character that going down so i’ll have the position of the ground so i can put the character at the good place…

Is a function like gluUnProject witch return the position of colision but for a ray ? If i change camera view and i put it on the character looking down without drawing that could work no ?

Thanks,
Ludo

openGL is a RENDERING API, so it means it doesn’t provide any means to do collision detection.

To check collision with a model, the easiest way is to define a sphere around the model, and collision-test it with the enviroment.
To do so, check out this site : www.gametutorials.com

wizzo

oki thanks a lot ^^
I’ll make it myself :slight_smile:
Have a nice day everybody.