RotatePivot


Rotates a thing to the orientation of one of its frames. The thing will be rotated around the position of the frame used. If only the orientation of the thing should be changed, then the thing and its frame should have the same position. Note that the movement needed to orient the thing to the PYR of one of its frames is determined by the thing's starting PYR and position - so the thing will always make the same movement when orienting itself to one of its frames.

When the command is given, the current frame of the thing is set to 0. If another RotatePivot() command is given before the first finishes, the thing is given a current frame of -1 and the old command is discarded. The new command will start where the old one left off, and the original exactness will be lost. When the rotation is complete, the thing will arrive, and its current frame will be 0. Syntax:

RotatePivot(thing, frame, time);

time: This is the flex time in seconds that the thing is given to complete the rotation. Using a negative time will make the object reverse its movement, but still complete its movement in the given time as if it were not negative. If you use a time of 0, RotatePivot() will use a second instead.