It allows the function to be more general:

It will *always* be (0, 0, 1) if you want Sonic's feet to face the surface underneath them (that is, the function will line up Sonic's "up" with the surface normal). If you use (1, 0, 0), Sonic's back will line up with the surface you c_trace, since it'll line up Sonic's local x-axis with the surface normal (this would be similar to "vec_to_angle", except the roll won't necessarily be zero, since only the smallest rotation possible is done to line the angle up).

Don't forget to rotate Sonic's pan relative to his current orientation (using ang_rotate or c_rotate(..., USE_AXIS)) instead of just adding or subtracting to his pan.

Jibb


Formerly known as JulzMighty.
I made KarBOOM!