lwjgl collision detection

Started by kc, April 09, 2009, 16:35:08

Previous topic - Next topic

kc

Hi i wanna limit my car model movement to my road and detect its collision with pavement which is another model...
somebody please tell me how can i do it..

bobjob

If you plan to have complex tracks (with ramps and such), I think the simplest way for a car game would be.

to treat the car as an elipsoid (or sphere). and to do a point to triangle collision.

kc

thank u for replying..
I cant treat car as elipsoid(or sphere) because my guide wants perfection.
i am trying to take minimum and maximum point of car (it covers all four edges of car) and check whether it lies inside triangles on road. but its not working.. i am not getting y its not working.
can u please tell me y its not working..?
i am using
modelViewMatrix = getModelviewMatrix();
car.projectVerts(car, modelViewMatrix, projectionMatrix, viewport);
functions and taking minimum and maximum points from projected vertices.