Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


GetPoint(float)

Get a point that lies a given distance along a ray.
Read time 1 minuteLast updated 4 days ago

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
public readonly Vector2 GetPoint(float distance)

Parameters

distance

Distance of the desired point along the path of the ray.

Returns

Type

Description

Vector2

Remarks

The distance is measured away from the ray's origin along its direction.
Additional Resources: Ray2D.origin, Ray2D.direction.