Scripting API

Scripting API

Trigger3D

Record struct in Abyss.Physics3D, from Abyss.Physics3D.

A body that went into, came out of or is inside a trigger: Physics3D.TriggersEntered, Physics3D.TriggersExited and Physics3D.TriggersStaying.

public readonly record struct Trigger3D

Constructors

Trigger3D

public Trigger3D(ulong Trigger, ulong Other, ulong OtherCollider)

A body that went into, came out of or is inside a trigger: Physics3D.TriggersEntered, Physics3D.TriggersExited and Physics3D.TriggersStaying.

Parameters

  • Trigger: The entity of the trigger: a collider with Is Trigger ticked, on a body or under one, or ground.
  • Other: The body that went in or came out: an entity with a Rigidbody 3D, or ground.
  • OtherCollider: The entity of its collider that went in first, or came out last: Other itself, or one under it.

Properties

Trigger

public ulong Trigger { get; init; }

The entity of the trigger: a collider with Is Trigger ticked, on a body or under one, or ground.

Other

public ulong Other { get; init; }

The body that went in or came out: an entity with a Rigidbody 3D, or ground.

OtherCollider

public ulong OtherCollider { get; init; }

The entity of its collider that went in first, or came out last: Other itself, or one under it.

Methods

Involves

public bool Involves(ulong entity)

Whether entity is the trigger, or the body or the collider that went in.

Parameters

  • entity