Scripting API

Scripting API

Rigidbody3D

Struct in Abyss.Physics3D, from Abyss.Physics3D.

A body Physics 3D moves: by gravity, by what it meets and by what code does to it, its colliders — a BoxCollider3D and the others on the same entity, and those on the entities under it that have no Rigidbody 3D nearer — what it meets with. Its place is the entity's Transform; its velocities are what the last step left, and setting them is what code moves it by.

public struct Rigidbody3D

Remarks

Forces, impulses and a move to a place are asked of Physics3D, which applies them at the next step. An entity with colliders and no body at or above it is ground: it does not move. A child with a Rigidbody 3D of its own is a body of its own.

Fields

Type

public BodyType3D Type

How it moves.

UseAutoMass

public bool UseAutoMass

Whether its mass is worked out from its colliders, each its volume times its Density, rather than Rigidbody3D.Mass, which the step then says it was.

Mass

public float Mass

Its mass, in kilograms, whatever its colliders' sizes; what they make it where it uses auto mass.

GravityScale

public float GravityScale

How much of gravity pulls it: 1 all, 0 none, -1 upwards.

LinearDamping

public float LinearDamping

How quickly its moving slows of itself, as in air.

AngularDamping

public float AngularDamping

How quickly its turning slows of itself.

Freeze

public Freeze3D Freeze

Which ways it never moves or turns, along and about the world's axes: a character that stays upright never turns about X or Z.

Interpolate

public Interpolation3D Interpolate

Whether it is drawn between fixed steps.

CollisionDetection

public CollisionDetection3D CollisionDetection

How it is kept from passing through what it meets.

LinearVelocity

public Vector3 LinearVelocity

How fast it moves, in meters a second: what the last step left, and what code sets to move it.

AngularVelocity

public Vector3 AngularVelocity

How fast it turns about each of the world's axes, in degrees a second, anticlockwise looking down the axis.