# ShapeTimeOfImpact(TimeOfImpactInput)

> Calculate the upper bound on time before two shape proxies penetrate i.e. the time-of-impact. Time is represented as a fraction in the range [0, maxInterval]. This uses a swept separating axis and may miss some intermediate, non-tunneling collisions.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.LowLevelPhysics2D](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d.md)
* **Assembly:** UnityEngine.Physics2DModule

```csharp
public static PhysicsQuery.TimeOfImpactResult ShapeTimeOfImpact(PhysicsQuery.TimeOfImpactInput toiInput)
```

### Parameters

**** (\[TimeOfImpactInput]\(/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsquery/timeofimpactinput)): The input describing the shapes and how they should move.

### Returns

| Type                                                                                                                   | Description                |
| ---------------------------------------------------------------------------------------------------------------------- | -------------------------- |
| [TimeOfImpactResult](/engine/6000.3/script-reference/unityengine/lowlevelphysics2d/physicsquery/timeofimpactresult.md) | The time of impact result. |
