PhysicsCallbacks
All callback interfaces and targets.
Read time 2 minutesLast updated 11 days ago
Definition
- Type: Struct
- Namespace: Unity.U2D.Physics
- Assembly: UnityEngine.PhysicsCore2DModule
- Implements: IEquatable<PhysicsCallbacks>
public readonly struct PhysicsCallbacks : IEquatable<PhysicsCallbacks>
Structs
Struct | Description |
|---|---|
| PhysicsCallbacks.BodyUpdateCallbackTargets | Contains all the body update callback targets returned from PhysicsWorld.GetBodyUpdateCallbackTargets. |
| PhysicsCallbacks.ContactCallbackTargets | Contains all the contact callback targets returned from PhysicsWorld.GetContactCallbackTargets. |
| PhysicsCallbacks.JointThresholdCallbackTargets | Contains all the joint callback targets returned from PhysicsWorld.GetJointThresholdCallbackTargets. |
| PhysicsCallbacks.TriggerCallbackTargets | Contains all the trigger callback targets returned from PhysicsWorld.GetTriggerCallbackTargets. |
Interfaces
Interface | Description |
|---|---|
| PhysicsCallbacks.IBodyUpdateCallback | An interface that when implemented, can be called as a target by PhysicsWorld.SendBodyUpdateCallbacks. |
| PhysicsCallbacks.IContactCallback | An interface that when implemented, can be called as a target by PhysicsWorld.SendContactCallbacks. |
| PhysicsCallbacks.IContactFilterCallback | An interface that when implemented, can be called as a target when a PhysicsShape has _contactFilterCallbacks set to true. The PhysicsWorld the PhysicsShape is in also has to have its _contactFilterCallbacks set to true. |
| PhysicsCallbacks.IJointThresholdCallback | An interface that when implemented, can be called as a target by PhysicsWorld.SendJointThresholdCallbacks. |
| PhysicsCallbacks.IPreContactCallback | An interface that when implemented, is called as a contact between a pair of shapes is updated, before the contact is solved. The callback receives the full contact manifold and may modify it, or cancel the contact by calling Cancel on the event. |
| PhysicsCallbacks.IPreContinuousCallback | An interface that when implemented, is called during the continuous collision stage when a fast-moving shape is about to be stopped short of a shape it would otherwise pass through. Returning false lets the shape continue rather than being stopped at the predicted impact point. |
| PhysicsCallbacks.ITransformChangedCallback | An interface that when implemented, can be called when using PhysicsWorld.RegisterTransformChange. |
| PhysicsCallbacks.ITransformWriteCallback | An interface that when implemented, can be called as a target set with _transformWriteCallbackTarget. |
| PhysicsCallbacks.ITriggerCallback | An interface that when implemented, can be called as a target by PhysicsWorld.SendTriggerCallbacks. |