Skip to main content

RealtimeTransformModel

RealtimeTransformModel

Properties

useGravity

bool useGravity { get; set; }

True if the rigidbody on this transform is using gravity on the simulating client.

isKinematic

bool isKinematic { get; set; }

True if the rigidbody on this transform is kinematic on the simulating client.

isSleeping

bool isSleeping { get; set; }

True if the rigidbody on this transform is sleeping on the simulating client.

maintainOwnershipWhileSleeping

bool maintainOwnershipWhileSleeping { get; set; }

True if the rigidbody on this transform shouldn't clear ownership when it sleeps. This is useful for rigidbodies that should never be simulated on different clients, like player objects.

timestamp

double timestamp { get; }

hasTransformChanges

bool hasTransformChanges { get; }

True if the model has any pending transform changes it needs to send to the datastore.

hasPhysicsBodyChanges

bool hasPhysicsBodyChanges { get; }

True if the model has any pending physics body changes it needs to send to the datastore.

hasPhysicsStateChanges

bool hasPhysicsStateChanges { get; }

True if the model has any pending physics state changes it needs to send to the datastore.

position

Vector3 position { get; set; }

rotation

Quaternion rotation { get; set; }

scale

Vector3 scale { get; set; }

velocity

Vector3 velocity { get; set; }

angularVelocity

Vector3 angularVelocity { get; set; }

rotation2D

float rotation2D { get; set; }

velocity2D

Vector2 velocity2D { get; set; }

angularVelocity2D

float angularVelocity2D { get; set; }

physicsBodyTimeOffset

float physicsBodyTimeOffset { get; set; }

physicsState

PhysicsState physicsState { get; set; }

physicsStateTimeOffset

float physicsStateTimeOffset { get; set; }

syncPosition

bool syncPosition { get; set; }

syncRotation

bool syncRotation { get; set; }

syncScale

bool syncScale { get; set; }

skipInterpolation

bool skipInterpolation { get; set; }

Methods

SetSafePosition

void SetSafePosition(Vector3 p)

Set the position, while checking for NaN and custom epsilon.

SetSafeRotation

void SetSafeRotation(Quaternion r)

Set the rotation, while checking for NaN and custom epsilon.

SetSafeRotation2D

void SetSafeRotation2D(float r)

Set the 2D rotation, while checking for NaN.

SetSafeScale

void SetSafeScale(Vector3 s)

Set the scale, while checking for NaN and custom epsilon.

SetSafeVelocity

void SetSafeVelocity(Vector3 v)

Set the velocity, while checking for NaN and custom epsilon.

SetSafeVelocity2D

void SetSafeVelocity2D(Vector2 v)

Set the 2D velocity, while checking for NaN.

SetSafeAngularVelocity

void SetSafeAngularVelocity(Vector3 v)

Set the angular velocity, while checking for NaN and custom epsilon.

SetSafeAngularVelocity2D

void SetSafeAngularVelocity2D(float v)

Set the angular velocity, while checking for NaN.