Options
All
  • Public
  • Public/Protected
  • All
Menu

A result from a trace

Hierarchy

  • TraceHit

Index

Properties

distance

distance: number

The distance from the start of the trace to the Location in world space. This value is 0 if there was an initial overlap (trace started inside another colliding object).

impactPosition

impactPosition: Vector

Position of the actual contact of the trace shape (box, sphere, line) with the impacted object. Example: for a sphere trace test, this is the point where the surface of the sphere touches the other object.

normal

normal: Vector

Normal of the hit in world space, for the object that was hit by the sweep, if any. For example if a box hits a flat plane, this is a normalized vector pointing out from the plane.

object

object: GameObject

The object that was hit

position

position: Vector

The position where the moving shape would end up against the impacted object. Equal to the point of impact for line tests. Example: for a sphere trace test, this is the point where the center of the sphere would be located when it touched the other object.

Methods

clone