Advertisement

Aligning objects on terrain

Started by June 19, 2003 07:42 AM
0 comments, last by Cuculain 21 years, 8 months ago
I want to implement a nice algorithm for orienting/aligning units/objects on a terrain grid. It is for a RTS game so it doesn''t have to be perfect, but rather fast and simple. I''m currently thinking about taking the triangle/face that the unit is on and averaging between that face and an ''up''-vector. Also when moving between two faces the old and new face should first be averaged and then the result averaged with the ''up''-vector. I''m very interested in information/ideas about how something like the above could be accomplished in a good way, preferably without heavy math.
use triangle normal. or use face or vertex normals of adjacent triangles to get smooth blending.
3D Side-Scroller game demo Project-X2 "playable"Lashkar: A 3D Game & Simulation Project demo @ lashkar.berlios.de

This topic is closed to new replies.

Advertisement