function place_me_on_surface
{
vec_set(temp,my.z); //set primary vector
temp.z -= 5; // 'bout half a foot from the surface
var_angle[3] + { my.pan, my.tilt, my.roll }; // point angle in the direction of character's feet
vec_rotate(temp,angle); //rotate vector
c_trace(my.z, temp, IGNORE_ME); //trace from character's feet about half a foot
vec_set(my.z, target); // put on surface
vec_to_angle(my.tilt, normal); // stand "upright" from normal
vec_to_angle(my.roll, normal);
}