# 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:** [Unity.U2D.Physics](/engine/6000.6/script-reference/unity/u2d/physics.md)
* **Assembly:** UnityEngine.PhysicsCore2DModule

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

### Parameters

**** (\[TimeOfImpactInput]\(/engine/6000.6/script-reference/unity/u2d/physics/physicsquery/timeofimpactinput)): The input describing the shapes and how they should move.

### Returns

| Type                                                                                                       | Description                |
| ---------------------------------------------------------------------------------------------------------- | -------------------------- |
| [TimeOfImpactResult](/engine/6000.6/script-reference/unity/u2d/physics/physicsquery/timeofimpactresult.md) | The time of impact result. |
