User Tools

Site Tools


tnhscript:turnatwaypoints

TurnAtWaypoints

Will turn a moving terrain object so it has the same orientation of the waypoint it just reached. This looks best when the objects are turned so they point in the direction they travel.

Set the initial values of Tweq\Rotate to the axes which will be rotated. Only the X (rate) value for each axis is used to set the rotation speed. A rate of 0 will ignore that axis.

When the object reaches a waypoint, the Tweq\Rotate property is adjusted to match the waypoint. The direction of the turn will be by the shortest distance. The object only turns while the moving terrain is active.

Messages Waypoint, TweqComplete, Starting, Stopping
Properties Tweq\Rotate
tnhscript/turnatwaypoints.txt · Last modified: 2010/11/22 19:12 (external edit)