Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualMercile55

Posted 21 January 2013 - 06:53 PM

If it's a heightmap, you should already know the A,B,C of any given triangle of the terrain (you must know at least two points on the plane to calculate third), and then use SuperVGA's formula to calculate it. Calculating collision in real-time against a terrain is a waste of time (unless it's morphing infinite terrain), and you want that time to be spent on collision detection with other things, i.e. buildings, moving objects, etc.

EDIT: Also, is your Temp vector normalized, when calling DotProduct, or do you normalize inside?

#1Mercile55

Posted 21 January 2013 - 06:50 PM

If it's a heightmap, you should already know the A,B,C of any given triangle of the terrain (you must know at least two points on the plane to calculate third), and then use SuperVGA's formula to calculate it. Calculating collision in real-time against a terrain is a waste of time (unless it's morphing infinite terrain), and you want that time to be spent on collision detection with other things, i.e. buildings, moving objects, etc.


PARTNERS