Rigidbody2DSynchronizable Class

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

Definition

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

Constructors

Properties

angularVelocity

Angular velocity in degrees per second.

gravityScale The degree to which this object is affected by gravity.
isKinematic Controls whether physics affects the rigidbody.
(Overrides RigidbodySynchronizableCommonisKinematic)
position

The position of the rigidbody.

rotation

The rotation of the rigidbody.

useGravity Controls whether gravity affects this rigidbody.
(Overrides RigidbodySynchronizableCommonuseGravity)
velocity

Linear velocity of the Rigidbody in units per second.

Methods

AddForce(Vector2, ForceMode) Adds a force to the Rigidbody.
AddForce(Vector2, ForceMode2D) Adds a force to the Rigidbody.
AddForce(Single, Single, ForceMode) Adds a force to the Rigidbody.
AddForce(Single, Single, ForceMode2D) Adds a force to the Rigidbody.
AddTorque Adds a torque to the rigidbody.
AssembleData
(Overrides SynchronizableAssembleData(Writer, SerializeInfo))
Awake
(Overrides RigidbodySynchronizableCommonAwake)
DisassembleData
(Overrides SynchronizableDisassembleData(Reader, UnserializeInfo))
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