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

ChainGeometry.CastRay

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

Declaration

public LowLevelPhysics2D.PhysicsQuery.CastResult CastRay(LowLevelPhysics2D.PhysicsQuery.CastRayInput castRayInput, bool oneSided);

Parameters

Parameter Description
castRayInput The configuration of the ray to cast.
oneSided Whether to treat the segment as having one-sided collision. The "left" side collision is ignored.

Returns

CastResult The results of the intersection test.

Description

Calculate if a world ray intersects the geometry. See CastResult.