TweenCircularComponent

Provides circular motion of an object.

# Properties

[{"index":"float Degree (Sync)","0":"Defines the total rotation angle. It rotates once if the value is 360. It rotates infinitely if the value is 0."}]

[{"index":"boolean IsClockwise (Sync)","0":"Define the direction of rotation. Rotate clockwise if set to true."}]

[{"index":"boolean LookAtCenter (Sync)","0":"References the center point when rotating if the value is set to true."}]

[{"index":"float Radius (Sync)","0":"Defines the turning radius."}]

[{"index":"float Speed (Sync)","0":"Defines how many degrees per second to rotate. Rotates once per second if the value is 360."}]

##### inherited from TweenBaseComponent:

[{"index":"boolean AutoDestroy (Sync)","0":"When true, this Component is removed from an Entity when the tween reaches its destination and ends or when Stop() is called directly."}]

[{"index":"boolean AutoStart (Sync)","0":"If true, the tween will play automatically upon starting the game."}]

[{"index":"TweenState CurrentState (Sync) (ReadOnly) (HideFromInspector)","0":"The current playback state."}]

[{"index":"Vector3 OriginPosition (Sync) (ReadOnly) (HideFromInspector)","0":"The starting position of the tween."}]

[{"index":"Quaternion OriginRotation (Sync) (ReadOnly) (HideFromInspector)","0":"The initial rotation value of the tween."}]

[{"index":"Vector3 OriginScale (Sync) (ReadOnly) (HideFromInspector)","0":"The initial size of the tween."}]

[{"index":"TweenSyncType SyncType (ReadOnly)","0":"Sets the playback subject. The default value is Default. You can control the tween with functions on both the server and the client. Server status is always synchronized to the client. Setting the execution area control to client only restricts the control of the tween to the client only and does not synchronize to the server.Tween Control Functions: Play, Pause, Stop, Destroy, RestartFromCurrentPosition"}]

[{"index":"number TweenTime (ReadOnly) (HideFromInspector)","0":"The amount of elapsed time after starting the tween. The unit of measure is the second."}]

##### inherited from Component:

[{"index":"boolean Enable (Sync)","0":"Checks whether Component is activated or not."}]

[{"index":"boolean EnableInHierarchy (ReadOnly) (HideFromInspector)","0":"Displays whether this Component is Enable in the hierarchy. If Entity Enable is false regardless of Component Enable, returns false."}]

[{"index":"Entity Entity (ReadOnly)","0":"The Entity that owns this component."}]

# Methods

##### inherited from TweenBaseComponent:

[{"index":"void Destroy()","0":"Changes CurrentState to Destroying and removes this Component."}]

[{"index":"void Pause()","0":"Pauses the tween. Changes CurrentState to Pausing."}]

[{"index":"void Play()","0":"Plays the tween. Changes CurrentState to Playing."}]

[{"index":"void RestartFromCurrentPosition()","0":"Restarts from current location."}]

[{"index":"void Stop(boolean reset)","0":"Stops the tween. Changes CurrentState to Idle. Specifying true for reset returns the tween's position and progress to the initial state."}]

##### inherited from Component:

[{"index":"boolean IsClient()","0":"Returns whether the current execution environment is a client or not."}]

[{"index":"boolean IsServer()","0":"Returns whether the current execution environment is a server or not."}]

# Examples

This is an example of making an Entity with `TweenCircularComponent` rotate infinitely.
    
    
    @Component
    script CircularMotionSetup extends Component
        @ExecSpace("ServerOnly")
        method void OnBeginPlay()
            local tween =self.Entity.TweenCircularComponent
            tween.Degree = 0
            
            -- Sets the rotation radius to 2.
            tween.Radius = 2
            
            -- Rotates at a speed of 180 degrees per second. It takes 2 seconds to complete one full rotation. 
            tween.Speed = 180
        end
    end
    

# SeeAlso

  * [Entity Section Movement](/docs?postId=122)