PDA

View Full Version : collision with terrain



cwc36
07-29-2002, 05:52 PM
I'm using a 3ds model to load a terrain.
i had arranged all the face materials,
subfaces and vertexs in some new buffers,
so i can get the vertices of each triangles..
I try to use the convex method to check the position of the camera(x,z) with the vertices buffers...(to check the camera in which triangles).. then
i try to interpolate the camera(x,z) with the vertices which had found and get the y axis for the triangles, but it look
like not working and very slow..

Do u have any suggestion to solve this problem?


[This message has been edited by cwc36 (edited 07-30-2002).]

jide
07-30-2002, 08:51 AM
i think rectangular approx could help you first, then you could get deeper. it's what i do personnaly, and it's quite correct.

cwc36
07-31-2002, 04:44 PM
Retangular approah??

Is it using GL_QUAD to apply the retangular?
so... take 4 vertexes to draw the retangular instead of 3 vertexes to draw the triangles...