// do a trace to get the z position below the entity
tracePos = c_trace(my.x, vector(my.x, my.y, my.z - 500), IGNORE_FLAG2 | IGNORE_ME | IGNORE_PASSABLE | IGNORE_PUSH);
alignToVec(my.pan, normal, vector(0,0,1), 15); // awesome for scaling walls, bit useless in a beat em up
// set the position of the entity smoothly to the trace target