RigidbodySynchronizableposition Property

The position of the rigidbody.

Definition

Namespace: Alteruna.Multiplayer
Assembly: Alteruna (in Alteruna.dll) Version: 2.0.1+a1176e08a0b4a6bfd8fefeddde6163a16d29e5ab
C#
public Vector3 position { get; set; }

Property Value

Vector3

Example

RigidbodySynchronizable.position allows you to get and set the position of a Rigidbody using the physics engine and sync it immediately to other clients.
If you change the position of a rigidbody using RigidbodySynchronizable.position, the transform will be updated after the next physics simulation step.
This is faster than updating the position using Transform.position, as the latter will not trigger a sync packet and cause all attached Colliders to recalculate their positions relative to the Rigidbody. If you want to continuously move a rigidbody use MovePosition instead, which takes interpolation into account.

See Also