# PhysicsEvents

> Various events that can be retrieved during and after the simulation has completed. See PhysicsWorld.Simulate and PhysicsWorld.Simulate.

## Definition

* **Type:** Struct
* **Namespace:** [Unity.U2D.Physics](/engine/6000.5/script-reference/unity/u2d/physics.md)
* **Assembly:** UnityEngine.PhysicsCore2DModule

```csharp
public readonly struct PhysicsEvents
```

## Static Events

| Member                                                                                                            | Description                                                                                                                                                                                                                                                                            |
| ----------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [PostSimulate](/engine/6000.5/script-reference/unity/u2d/physics/physicsevents/postsimulate.md)                   | Event callback for a post-simulate event. This is called after the simulation has finished running and is always called on the main-thread. See [PhysicsEvents.PostSimulateEventHandler](/engine/6000.5/script-reference/unity/u2d/physics/physicsevents/postsimulateeventhandler.md). |
| [PreSimulate](/engine/6000.5/script-reference/unity/u2d/physics/physicsevents/presimulate.md)                     | Event callback for a pre-simulate event. This is called prior to the simulation running and is always called on the main-thread. See [PhysicsEvents.PreSimulateEventHandler](/engine/6000.5/script-reference/unity/u2d/physics/physicsevents/presimulateeventhandler.md).              |
| [WorldDefinitionChange](/engine/6000.5/script-reference/unity/u2d/physics/physicsevents/worlddefinitionchange.md) | Event callback for a world definition change event.                                                                                                                                                                                                                                    |
| [WorldDrawResults](/engine/6000.5/script-reference/unity/u2d/physics/physicsevents/worlddrawresults.md)           | Event callback for a world draw results event. This is only called if the world is currently rendering as specified by \_renderingMode or if [\_alwaysDrawWorlds](/engine/6000.5/script-reference/unity/u2d/physics/physicscoresettings2d/alwaysdrawworlds.md) is true.                |

## Structs

| Struct                                                                                                                                | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [PhysicsEvents.BodyUpdateEvent](/engine/6000.5/script-reference/unity/u2d/physics/physicsevents/bodyupdateevent.md)                   | An event produced by a [PhysicsBody](/engine/6000.5/script-reference/unity/u2d/physics/physicsbody.md) that indicates the simulation changed the body in one of the following ways:                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| [PhysicsEvents.ContactBeginEvent](/engine/6000.5/script-reference/unity/u2d/physics/physicsevents/contactbeginevent.md)               | An event produced by a pair of Shapes, neither of which are a trigger, began touching. The shapes provided may have been destroyed so they should always be validated with [\_isValid](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/isvalid.md). See [\_contactBeginEvents](/engine/6000.5/script-reference/unity/u2d/physics/physicsworld/contactbeginevents.md).                                                                                                                                                                                                                                |
| [PhysicsEvents.ContactEndEvent](/engine/6000.5/script-reference/unity/u2d/physics/physicsevents/contactendevent.md)                   | An event produced by a pair of Shapes, neither of which are a trigger, stopped touching. You will get an end event if you do anything that destroys contacts prior to the last world simulation step which include things like setting the body transform, destroying a body etc. The shapes provided may have been destroyed so they should always be validated with [\_isValid](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/isvalid.md). See [\_contactEndEvents](/engine/6000.5/script-reference/unity/u2d/physics/physicsworld/contactendevents.md).                                         |
| [PhysicsEvents.ContactFilterEvent](/engine/6000.5/script-reference/unity/u2d/physics/physicsevents/contactfilterevent.md)             | An event produced when a pair of [PhysicsShape](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape.md) come into contact. This can be used to decide if a contact between the two shapes should be created or not.                                                                                                                                                                                                                                                                                                                                                                                      |
| [PhysicsEvents.ContactHitEvent](/engine/6000.5/script-reference/unity/u2d/physics/physicsevents/contacthitevent.md)                   | An event produced when a pair of [PhysicsShape](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape.md) come into contact at relative speed exceeding the [\_contactHitEventThreshold](/engine/6000.5/script-reference/unity/u2d/physics/physicsworld/contacthiteventthreshold.md).                                                                                                                                                                                                                                                                                                                      |
| [PhysicsEvents.JointThresholdEvent](/engine/6000.5/script-reference/unity/u2d/physics/physicsevents/jointthresholdevent.md)           | An event produced by a Joint which exceeds either its [\_forceThreshold](/engine/6000.5/script-reference/unity/u2d/physics/physicsjoint/forcethreshold.md) or [\_torqueThreshold](/engine/6000.5/script-reference/unity/u2d/physics/physicsjoint/torquethreshold.md).                                                                                                                                                                                                                                                                                                                                               |
| [PhysicsEvents.PreSolveEvent](/engine/6000.5/script-reference/unity/u2d/physics/physicsevents/presolveevent.md)                       | An event produced when a contact between a pair of [PhysicsShape](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape.md) is updated, used to provide the ability to decide if the contact should be disabled or not.                                                                                                                                                                                                                                                                                                                                                                                    |
| [PhysicsEvents.TransformChangeEvent](/engine/6000.5/script-reference/unity/u2d/physics/physicsevents/transformchangeevent.md)         | An event produced after registering via [PhysicsWorld.RegisterTransformChange](/engine/6000.5/script-reference/unity/u2d/physics/physicsworld/registertransformchange.md).                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| [PhysicsEvents.TransformTweenWriteEvent](/engine/6000.5/script-reference/unity/u2d/physics/physicsevents/transformtweenwriteevent.md) | An event produced and sent to the callback target set with [\_transformWriteCallbackTarget](/engine/6000.5/script-reference/unity/u2d/physics/physicsworld/transformwritecallbacktarget.md) which must implement [PhysicsCallbacks.ITransformWriteCallback](/engine/6000.5/script-reference/unity/u2d/physics/physicscallbacks/itransformwritecallback.md) which will have [PhysicsCallbacks.ITransformWriteCallback.OnTransformTweenWrite](/engine/6000.5/script-reference/unity/u2d/physics/physicscallbacks/itransformwritecallback/ontransformtweenwrite.md) called allowing custom transform writing.          |
| [PhysicsEvents.TransformWriteEvent](/engine/6000.5/script-reference/unity/u2d/physics/physicsevents/transformwriteevent.md)           | An event produced and sent to the callback target set with [\_transformWriteCallbackTarget](/engine/6000.5/script-reference/unity/u2d/physics/physicsworld/transformwritecallbacktarget.md) which must implement [PhysicsCallbacks.ITransformWriteCallback](/engine/6000.5/script-reference/unity/u2d/physics/physicscallbacks/itransformwritecallback.md) which will have [PhysicsCallbacks.ITransformWriteCallback.OnTransformWrite](/engine/6000.5/script-reference/unity/u2d/physics/physicscallbacks/itransformwritecallback/ontransformwrite.md) called allowing custom transform writing.                    |
| [PhysicsEvents.TriggerBeginEvent](/engine/6000.5/script-reference/unity/u2d/physics/physicsevents/triggerbeginevent.md)               | An event produced when a pair of Shapes, one of which was a trigger, began touching. The shapes provided may have been destroyed so they should always be validated with [\_isValid](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/isvalid.md). See [\_triggerBeginEvents](/engine/6000.5/script-reference/unity/u2d/physics/physicsworld/triggerbeginevents.md).                                                                                                                                                                                                                                  |
| [PhysicsEvents.TriggerEndEvent](/engine/6000.5/script-reference/unity/u2d/physics/physicsevents/triggerendevent.md)                   | An event produced when a pair of Shapes, one of which was a trigger, stopped touching. An end event will be produced anything that destroys contacts happens, prior to the last world simulation step, which include things like setting the body transform, destroying a body or shape or changing a contact filter etc. The shapes provided may have been destroyed so they should always be validated with [\_isValid](/engine/6000.5/script-reference/unity/u2d/physics/physicsshape/isvalid.md). See [\_triggerEndEvents](/engine/6000.5/script-reference/unity/u2d/physics/physicsworld/triggerendevents.md). |

## Delegates

| Delegate                                                                                                                                                | Description                                                                                                                                                                                                                                                                                                                                                  |
| ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| [PhysicsEvents.PostSimulateEventHandler](/engine/6000.5/script-reference/unity/u2d/physics/physicsevents/postsimulateeventhandler.md)                   | Event handler for a post-simulate event callback. This is called after the simulation has finished running and is always called on the main-thread. See [PhysicsWorld](/engine/6000.5/script-reference/unity/u2d/physics/physicsworld.md) and [PhysicsEvents.PostSimulate](/engine/6000.5/script-reference/unity/u2d/physics/physicsevents/postsimulate.md). |
| [PhysicsEvents.PreSimulateEventHandler](/engine/6000.5/script-reference/unity/u2d/physics/physicsevents/presimulateeventhandler.md)                     | Event handler for a pre-simulate event callback. This is called prior to the simulation running and is always called on the main-thread. See [PhysicsWorld](/engine/6000.5/script-reference/unity/u2d/physics/physicsworld.md) and [PhysicsEvents.PreSimulate](/engine/6000.5/script-reference/unity/u2d/physics/physicsevents/presimulate.md).              |
| [PhysicsEvents.WorldDefinitionChangeEventHandler](/engine/6000.5/script-reference/unity/u2d/physics/physicsevents/worlddefinitionchangeeventhandler.md) | Event handler for a world definition change event callback.                                                                                                                                                                                                                                                                                                  |
| [PhysicsEvents.WorldDrawResultsEventHandler](/engine/6000.5/script-reference/unity/u2d/physics/physicsevents/worlddrawresultseventhandler.md)           | Event handler for a world draw results event callback. This is only called if the world is currently rendering as specified by \_renderingMode or if [\_alwaysDrawWorlds](/engine/6000.5/script-reference/unity/u2d/physics/physicscoresettings2d/alwaysdrawworlds.md) is true.                                                                              |
