KROYSDOCS
HomeWhat's newv0.1.0
SCRIPTING API / Physics / Collision

Collision

Contact data passed to OnCollisionEnter, OnCollisionStay and OnCollisionExit. Physics reports contacts per body pair after each fixed step and scripts receive them at the end of the fixed-update phase, never during the physics step.

Kindstruct
NamespaceKroys.EngineScripting
Members4
SourceCollision.cs
DECLARATION

Declaration

Namespace Kroys.EngineScripting.

Declaration
public readonly struct Collision
REFERENCE

Members

Properties
#public Entity Other { get; }
The other entity in the contact.
property
#public Vector3 Point { get; }
Average world-space contact point (the last known point for exit callbacks).
property
#public Vector3 Normal { get; }
World-space contact normal pointing from this entity towards Other.
property
#public float PenetrationDepth { get; }
Deepest penetration of the contact.
property
Signatures
public Entity Other { get; }
public Vector3 Point { get; }
public Vector3 Normal { get; }
public float PenetrationDepth { get; }

KroysEngine 0.1.0 documentation, built from the engine repository by Tools/BuildDocsSite.py.