Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


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.
Read time 1 minuteLast updated 10 days ago

Definition

  • Type: Method
  • Namespace: Unity.U2D.Physics
  • Assembly: UnityEngine.PhysicsCore2DModule
public static PhysicsQuery.TimeOfImpactResult ShapeTimeOfImpact(PhysicsQuery.TimeOfImpactInput toiInput)

Parameters

The input describing the shapes and how they should move.

Returns

Type

Description

TimeOfImpactResultThe time of impact result.