Skip to content

Behavior rotate

This Behavior rotate community component allows an object in the scene to spin around an axis when triggered. Attach this component to the object to rotate. For a smooth gaming experience, it's recommended to attach only one Behavior rotate component to an object.

This component includes:

Property Description
Rotation Type Determines the type of rotation, either Circle or Arc. Specify the angle if you choose Arc.
Axis The central axis of rotation
Direction Determines the direction of the circular movement
Time The time it takes to finish a circle or an arc in seconds
Move No. Specifies the number of rotations
Loop Type Determines the loop type, either One-way or Two-way. If you choose One-way, the object always rotates in the same direction. If you choose Two-way, the rotation direction changes to the opposite whenever the previous rotation finishes.
Condition Determines the condition of the object rotation:
  • Auto play, the object rotates automatically
  • Event, the object rotates when a specific event occurs
Event name Specifies the trigger event name for object rotation. For example, it can be entered as registered in the AiGameEventRelay component. This field is only visible when the Condition is set to Event.
Final event Enter the name of an event to be emitted after all other settings of this Behavior rotate component have been executed.