The result of a shape-cast between two shapes, returned by the pairwise casts Shape.castShape and Collider.castShape.

The first shape is the one the cast is called on (the shape or collider this), and the second shape is the shape2 argument. Each witness point and normal is expressed in the local-space of its own shape, i.e., relative to that shape's pose (it does not depend on the shape's translation along the cast).

Hierarchy (view full)

Constructors

Properties

normal1: Vector

The outward normal on the first shape at the time of impact, expressed in the local-space of the first shape.

normal2: Vector

The outward normal on the second shape at the time of impact, expressed in the local-space of the second shape.

time_of_impact: number

The time of impact of the two shapes.

witness1: Vector

The contact point on the first shape at the time of impact, expressed in the local-space of the first shape.

witness2: Vector

The contact point on the second shape at the time of impact, expressed in the local-space of the second shape.

Methods