Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


CastRay(CastRayInput, out PhysicsShape)

Check if a ray intersects the chain. See PhysicsQuery.CastResult.
Read time 1 minuteLast updated 10 days ago

Definition

  • Type: Method
  • Namespace: Unity.U2D.Physics
  • Assembly: UnityEngine.PhysicsCore2DModule

CastRay(CastRayInput, PhysicsShape)

public PhysicsQuery.CastResult CastRay(PhysicsQuery.CastRayInput castRayInput, out PhysicsShape chainSegmentShape)

Parameters

castRayInput

The configuration of the ray to cast.

chainSegmentShape

A reference to the chain segment shape that the query found.

Returns

Type

Description

CastResultThe intersection details, if any, that were found.