用户工具

站点工具


侧边栏

script:unityengine:classes:ray2d:ray2d

Ray2D 二维射线

Description 描述

A ray in 2D space.

二维空间的射线。

A ray is a line segment that extends from a point in space in a specified direction. Rays have a number of uses in Unity but the most common is probably raycasting. This technique involves tracing along the path of a ray from its origin to determine if it intersects with any objects. This is useful for plotting the paths of projectiles, determining lines of sight and implementing many common game mechanics.

射线其实一条在指定的方向从一个点扩展的线段。射线有很多用途,在统一中最常见的可能是光线投射。这个技术是从起点沿射线的路径跟踪来确定它于任何对象相交。这个绘制的行进路线是有用的,定义视线和执行各种常见的游戏机制。

See Also: Physics2D.Raycast, Ray class, RaycastHit2D class.

Variables 变量

directionThe direction of the ray in world space.
世界空间射线的方向。
originThe starting point of the ray in world space.
在世界空间,射线的起点。

Functions 函数

GetPointGet a point that lies a given distance along a ray.
沿一条射线获取线上给定距离的点。
script/unityengine/classes/ray2d/ray2d.txt · 最后更改: 2016/08/02 05:33 (外部编辑)