@DJBMASTER&Quadraxas: I already tried to use vec_to_angle in combination with c_trace. The main problem is that "vec_to_angle" outputs *pan* and *tilt* angles. The pan-angle, however, is controlled by the player (left/right cursor keys) and determines the direction Sonic is moving at. What I need is to get tilt and roll correct instead of pan and tilt, see the difference? So getting the right tilt angle is no problem at all, but the roll-angle causes enormous problems.

@JulsMighty: Okay, that sounds just like the function I need. But yet I do not fully understand all parameters. The angle is clear, the first vector (world coordinates) is clear as well, but what about that local vector? What meaning does it have and where do I get it from? Or is it just *always* (0,0,1) if I want Sonic's feet to face the surface underneath them?