> I guess you have to do the following: > Do a traceline straight down to the ground at the front and at the back. > Then see whether there's any difference in trace length (forget about a few > tenths, it's only whole units that make a difference). If there is, use some > triangle maths to calculate the angle of the slope. Once you got it, use > this new angle to correct the vehicle's acceleration.
The angle of the slope will come from the vecPlaneNormal field of the UTIL_TraceLine() result. Just shove it into UTIL_VecToAngles() to convert the vector normal to an array of angles, then set the body angles of the vehicle entity to match. Jeffrey "botman" Broome _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders