Rigidbody2DSynchronizable Class

Rigidbody2DSynchronizable is a Synchronizable that synchronizes the state of a Rigidbody2D component.

Definition

Namespace: Alteruna
Assembly: Alteruna.Trinity (in Alteruna.Trinity.dll) Version: 1.3.4
C#
public class Rigidbody2DSynchronizable : RigidbodySynchronizableCommon
Inheritance
Object    Object    Component    Behaviour    MonoBehaviour    CommunicationBridge    CommunicationBridgeUID    Synchronizable    RigidbodySynchronizableCommon    Rigidbody2DSynchronizable

Properties

angularVelocity

Angular velocity in degrees per second.

isKinematic

Controls whether physics affects the rigidbody.


(Overrides RigidbodySynchronizableCommonisKinematic)
position

The position of the rigidbody.

rotation

The rotation of the rigidbody.

velocity

Linear velocity of the Rigidbody in units per second.

Methods

AddForce(Vector2, ForceMode) Adds a force to the Rigidbody.
AddForce(Single, Single, ForceMode) Adds a force to the Rigidbody.
AddTorque Adds a torque to the rigidbody.
AssembleData
(Overrides SynchronizableAssembleData(Writer, Byte))
Awake 
DisassembleData
(Overrides SynchronizableDisassembleData(Reader, Byte))
IsSleeping Is the rigidbody sleeping?
(Overrides RigidbodySynchronizableCommonIsSleeping)
MovePosition

Moves the rigidbody to position.

MoveRotation

Rotates the Rigidbody to angle (given in degrees).

OnCollisionEnter2D
(Overrides RigidbodySynchronizableCommonOnCollisionEnter2D(Collision2D))
Reset
(Overrides RigidbodySynchronizableCommonReset)
SetRotation

Sets the rotation of the Rigidbody2D to angle (given in degrees).

Sleep Forces a rigidbody to sleep at least one frame.
(Overrides RigidbodySynchronizableCommonSleep)
WakeUp Forces a rigidbody to wake up.
(Overrides RigidbodySynchronizableCommonWakeUp)

Fields

Rigidbody Rigidbody to synchronize.

See Also