The Rotate Command


    rotate [x] y [z] [sync OR nosync] [time=time] [loop OR noloop] [reset OR noreset] [wait=wait] [name=name]


Note: the loop, reset, and wait options are new in Outerworlds 3.3 and require 3.3 or later in order to function.

The rotate command causes an object to rotate continuously around one or more axes. The rotation occurs around the origin of the object. Thus, applying the rotate command to an off-center object can cause an object to "wobble", or even to spin in circles if it is far enough off-center.

The only required argument is y, which specifies the rotation speed around the y axis in RPM (rotations per minute). When creating an object that rotates around the x or z axes, or more than one axis simultaneously, all 3 axes must be specified. The maximum allowable RPM for any of the 3 axes is 50,000.

The sync and nosync flags indicate whether the rotation is synchronized to universe time. The default is sync. By synchronizing the rotation to universe time, it is possible to create a rotating object that appears to be at the same rotation for all users. This is most useful for slowly rotating objects (e.g. the hands of clock), since universe time is only synchronized to within a few seconds for all users. For faster rotating objects, sync is more useful for synchronizing multiple rotating objects in the same scene to each other (e.g. a series of gears that need to be properly "meshed" together.)

Note that in most cases the "nosync" flag will be desireable with rotate commands linked to the activate trigger. This is because unsynchronized rotates start rotating from the current yaw of the object, whereas synchronized rotates start rotating from a pre-calculated angle based on universe time.

An optional time argument can be specified to control how long the object rotates for. After time seconds elapse, the object stops rotating and stays at its final position. If a time is specified, the nosync flag is implied; timed rotations cannot also be synced.

For timed rotations, given a desired angle to rotate it can sometimes be confusing to figure out what the rpm should be for the rotation. There is actually a simple formula for this:

  rpm = a / (6 x t)

Where a is the desired angle, and t is the time to rotate. For example, say a door is desired that rotates 90 degrees in 2 seconds. The rpm for the y axis would be 90 / (6 x 2) = 90 / 12 = 7.5 rpm.

The optional loop argument (new in 3.3) is only meaningful if the rotate has a time specified. If loop is specified, the timed rotate will repeat again each time after it completes. noloop is the default.

The optional reset argument (new in 3.3) is also only meaningful if the rotate has a time specified. If reset is specified, the timed rotate will return immediately to its original position after it completes and the wait period has elapsed. noreset is the default.

The optional wait argument (new in 3.3) is only meaningful if the rotate has a time specified. It specifies how much time the rotate should pause at the end of its timed rotation before returning to its original position. If loop is specified, the default wait is 0 seconds (i.e. no pause), otherwise the default wait is infinite.

As with most other commands, you can optionally specify the name of another object to apply the rotation to.

Note that rotate is a special command and as such may not be available for use in all worlds.


    create rotate 10

This creates an object that rotates around its y axis 10 times per minute.

    create rotate 4 0 7

This creates an object that rotates 4 times per minute around its x axis and 7 times per minute around its z axis.

    activate rotate 0 name=sign

This creates an object that when clicked on, cancels any existing rotation on any nearby objects named "sign".

    activate rotate 0 0 20 nosync

This creates an object that begins rotating around its z axis 20 times per minute when clicked on. Since it uses the "activate" trigger, the rotation will only be visible to the user who clicked on the object, and thus has no need to be synchronized. Thus, the nosync option is specified.