文档

Unity Engine

Unity Engine

Ray

Representation of rays.
阅读时间1 分钟最后更新于 1 个月前

Definition

public struct Ray : IFormattable

Remarks

A ray is an infinite line starting at Ray.origin and going in some Ray.direction.

Constructors

Constructor

Description

Ray(UnityEngine.Vector3,UnityEngine.Vector3)Creates a ray starting at
origin
along
direction
.
Ray(UnityEngine.Vector3@,UnityEngine.Vector3@)Creates a ray starting at
origin
along
direction
.

Properties

Property

Description

directionThe direction of the ray.
originThe origin point of the ray.

Methods

Method

Description

GetPointReturns a point at
distance
units along the ray.
ToStringReturns a formatted string for this ray.