PDA

View Full Version : Collision heightmap.



Darkpower
06-16-2012, 01:03 AM
Hey!

I have trouble with collision detection. My heightmap have quads and each quad have two triangles. A diagonal line connects two corners in each quad. How can I determine which quad and which side of the line the character is standing on?

Plane equation: Ax+By+Cz+D=0, N=(A, B, C).

I know how to calculate Y(Height), but I need three points of the triangle (under the character).


How can I calculate?