G'day grin I've already answered in your topic, but I'll answer here for the benefit of others.

Basically, when you have an angle and a vector to line it up with, you need to decide how you'll line it up -- vec_to_angle, for example, lines up the angle's local x with the vector that's given to it. To do the same thing with my function, you'd pass it "vector(1, 0, 0)" -- except my function won't set roll to zero, as it makes the smallest rotation possible to line up the axis and the vector.

For most situations (such as walking on walls) you want to line up the entity's "up" with the surface normal. "vector(0, 0, 1)" points straight up, so that's what you'll pass to the function, along with "normal".

I hope I've made this clear now.

Jibb


Formerly known as JulzMighty.
I made KarBOOM!