Plush

SceneSpace#

PlushEngine · Type index

Namespace: PlushEngine

A runtime coordinate context: a scene's own space or one independent scene use. Positions use the simulation coordinates of that context; scene tunnel queries carry this identity even when rooms overlap.

public sealed class SceneSpace

Members: IsLoaded · Raycast · Scene · Trace · Use

IsLoaded#

public bool IsLoaded { get; }

Whether the scene and, when present, its use are still loaded.

Raycast#

public bool Raycast(Vector3 origin, Vector3 direction, float maxDistance, out RaycastHit hit, RuntimeEntity? ignore = null, bool includeSensors = false, int layerMask = -1, IReadOnlyList<RuntimeEntity>? ignoreEntities = null);

The closest body along a ray, following connected rectangular scene tunnels. Point, Normal and Direction on the hit use its destination space; Distance counts metres along the entire bent ray. Throws if more than 64 scene tunnels are needed, rather than reporting an untested path as clear.

Scene#

public RuntimeScene Scene { get; }

The scene that owns this space's objects and physics.

Trace#

public SpaceTrace Trace(Vector3 origin, Vector3 displacement, RuntimeEntity? ignore = null, bool includeSensors = false, int layerMask = -1, IReadOnlyList<RuntimeEntity>? ignoreEntities = null, int maxCrossings = 64);

Sweeps a point by displacement in metres, following scene tunnels and stopping at the first body. The result retains the destination space and rotated direction for the next step. Zero displacement is allowed; reaching maxCrossings stops at the next opening with TraversalLimitReached, without skipping collisions.

Use#

public SceneUse? Use { get; }

The independent scene use, or null for the scene's own space.

RaycastHit · RuntimeEntity · RuntimeScene · SceneUse · SpaceTrace

Source#