Version: Unity 6.3 Beta (6000.3)
LanguageEnglish
  • C#

WorldCastResult

struct in UnityEngine.LowLevelPhysics2D

/

Implemented in:UnityEngine.Physics2DModule

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

The results from performing any Cast query against the PhysicsWorld.

Properties

Property Description
fraction The fraction of the query cast distance the shape would move to the point of detection, in the range [0, 1].
isValid Check if the result is valid.
normal The 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 WorldCastResult.fraction being zero and WorldCastResult.point being an arbitrary point in the overlapped region. See WorldCastResult.point.
point The point of contact.
shape The shape that was detected by the cast.