Nebula
Containers

PhysicsFrameState

The motion of a physics frame in the space around it, once per tick, on every process that holds the frame (docs/container-tree.md D14): its pose, linear and angular velocity, and linear acceleration.

generated from the sources
public struct PhysicsFrameState

The motion of a physics frame in the space around it, once per tick, on every process that holds the frame (docs/container-tree.md D14): its pose, linear and angular velocity, and linear acceleration. The frame's owner computes it from the carrier it simulates; everyone else from the replicated stream, so a leased interior reads it one replication delay late. Nebula applies no fictitious forces by itself: whether crates slide when the ship brakes is the game's call, made with FrameInertia on the bodies that should, or from LocalAcceleration and LocalAngularVelocity directly.

Fields

Position

public Vector3 Position;

The frame's origin in the space around it.

Rotation

public Quaternion Rotation;

The frame's orientation in the space around it.

Velocity

public Vector3 Velocity;

Linear velocity of the frame's origin, in the space around it (m/s).

AngularVelocity

public Vector3 AngularVelocity;

Angular velocity, in the space around it (radians per second, axis times rate).

Acceleration

public Vector3 Acceleration;

Linear acceleration of the frame's origin, in the space around it (m/s²).

Tick

public uint Tick;

The tick this state was taken at.

HasRates

public bool HasRates;

At least two samples have been taken, so the rates mean something.

Properties

LocalAcceleration

public Vector3 LocalAcceleration { get; }

Acceleration expressed in the frame's own axes: what an accelerometer bolted to the deck reads.

LocalAngularVelocity

public Vector3 LocalAngularVelocity { get; }

AngularVelocity in the frame's own axes.

Methods

ToParent

public Vector3 ToParent(Vector3 local);

A frame-local point in the space around the frame.

ToLocal

public Vector3 ToLocal(Vector3 parent);

A point in the space around the frame, in frame-local coordinates.

PointVelocity

public Vector3 PointVelocity(Vector3 local);

How fast a point fixed in the frame moves in the space around it: v + ω × r.

On this page