用户工具

站点工具


侧边栏



Unity3D中文文档

script:unityengine:classes:raycasthit2d:raycasthit2d

RaycastHit2D 2D射线投射碰撞信息

Description 描述

Information returned about an object detected by a raycast in 2D physics.

返回有关2D物理射线投射检测对象信息。

A raycast is used to detect objects that lie along the path of a ray and is conceptually like firing a laser beam into the scene and observing which objects are hit by it. The RaycastHit2D class is used by Physics2D.Raycast and other functions to return information about the objects detected by raycasts.

射线投射用于检测沿射线路径的对象,就像在场景发射的激光束,观察哪些对象被它击中。

See Also: Physics2D, Ray2D class.RaycastHit2D类用于Physics2D.Raycast并返回射线碰到对象的信息。

Variables 变量

centroidThe centroid of the primitive used to perform the cast.
原始图形的重心。
colliderThe collider hit by the ray.
射线碰到的碰撞器。
distanceThe distance from the ray origin to the impact point.
从射线原点到接触点的距离。
fractionFraction of the distance along the ray that the hit occurred.
射线发生碰撞距离的百分比。
normalThe normal vector of the surface hit by the ray.
射线碰到表面的法线向量。
pointThe point in world space where the ray hit the collider's surface.
在世界坐标空间,射线碰到碰撞器表面的点。
script/unityengine/classes/raycasthit2d/raycasthit2d.txt · 最后更改: 2016/08/02 05:33 (外部编辑)