Interface ICharacterCollisionCallback
- Namespace
- Box3D
- Assembly
- Box3D.NET.dll
Receives the surfaces a character capsule is touching.
public interface ICharacterCollisionCallbackExamples
struct GatherPlanes : ICharacterCollisionCallback
{
public CollisionPlane[] Planes;
public int Count;
public bool OnContact(in CharacterContact contact)
{
if (Count < Planes.Length)
{
Planes[Count++] = CollisionPlane.From(contact);
}
return true;
}
}
Remarks
Implement this on a struct, as with the query callbacks, so that gathering contacts every frame allocates nothing.
Methods
- OnContact(in CharacterContact)
-
Called once for each surface the capsule is touching.