文档

Unity Engine

Unity Engine

GetPoint(float)

Get a point that lies a given distance along a ray.
阅读时间1 分钟最后更新于 1 个月前

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.