Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


PhysicsQuery.CastRayInput

Cast-Ray arguments used by CastRay queries.
Read time 1 minuteLast updated 9 days ago

Definition

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

Constructors

Constructor

Description

CastRayInput()Create a default Cast Ray input.
CastRayInput(UnityEngine.Vector2,UnityEngine.Vector2)Create a Cast-Ray with a default fraction of 1.

Properties

Property

Description

maxFractionThe maximum fraction of the translation to consider in the range (0 to 1), typically 1.
originThe origin (start) of the ray.
translationThe translation relative to the _origin of the ray.

Static Methods

Method

Description

FromToCalculate a Cast-Ray given two positions.