   Terrain Hugging ...
  Morning all!!Anyone have any ideas on how to go about making a NPC character walk over a surface, hugging the terrain properly?  I thought about using physics & IK, but there must be an easier way.  Any thoughts?Dan 
  If you''re using a heightmapping technique, you should be able to calculate the height at their position from that, just as with regular terrain vertices. ;  If the NPC units are human characters, I guess IK is the only approach to position the foots correctly on the ground. For units of simpler shapes (e.g. tanks, bounded by a OBB) simpler methods exist. ;  Nope, not using heightmaps, just imported polygon terrain.  Any good URLs on the subject at all? ;  gamelife ... What simpler methods do you mean?  I could use this to start with, then IK for more precise techniques(as I''m use human characters).;  I mean collison detection & response You could find more information on the maths & physics forum. ;  Are you using an octree or quadtreeeFind out which segmetn the player is in then use vertical planes to find out which poly(s) the player is over then find the smallest dot-coord and go from thereIt''s probably a little more complicated than that but there''s a basic idea. ;  If you want a really easy, but not very effective, way of doing this...Assuming you use a DX mesh, you can use D3DXIntersect and use your players location as source, and send a ray straight down (0.0, -1.0, 0.0 most of the time)...Then set new player.y to player.y = player.y - distance + desired height.That should make your char hug the terrain. ;  Cheers all!!  I''ll give it a go ... 