Documentation

Unity Engine


Unity Engine


PhysicsQuery.WorldCastResult

The results from performing any Cast query against the PhysicsWorld.
Read time 1 minuteLast updated 15 days ago

Definition

  • Type: Struct
  • Namespace: Unity.U2D.Physics
  • Assembly: UnityEngine.PhysicsCore2DModule
public readonly struct PhysicsQuery.WorldCastResult

Properties

Property

Description

fractionThe fraction of the query cast distance the shape would move to the point of detection, in the range [0, 1].
isValidCheck if the result is valid.
normalThe surface normal at the point of contact. In all non-overlapped cases, this will be a unit-normal. If there was an initial overlap, the normal will be zero (degenerate) along with the PhysicsQuery.WorldCastResult.fraction being zero and PhysicsQuery.WorldCastResult.point being an arbitrary point in the overlapped region. See PhysicsQuery.WorldCastResult.point.
pointThe point of contact.
shapeThe shape that was detected by the cast.

Structs

Struct

Description

PhysicsQuery.WorldCastResult.SortAscendingOrderAscending distance sort comparer.