标签:纹理 tab www 变换 search war raycast ros ace
1,射线
(1)Ray射线
A ray is an infinite line starting at origin and going in some direction.
Ray是具有开始点和方向的无穷线。
构造:
Ray ray = new Ray(transform.position, transform.forward);
transform.position为起点, transform.forward为方向。
(2)Raycast射线投射C#
=> public static bool Raycast(Vector3 sourcePosition, Vector3 targetPosition, out NavMeshHit hit, int areaMask);
sourcePosition:射线起点
targetPosition:射线终点
hit:保存射线投射位置的属性
areaMask:绘制路径时,位掩码指定NavMesh区域中可以被通过的地方。
(3)RaycastHit射线投射碰撞信息
barycentricCoordinate | The barycentric coordinate of the triangle we hit. 碰到的三角形的重心坐标。 |
collider | The Collider that was hit. 碰到的碰撞器。 |
distance | The distance from the ray‘s origin to the impact
point. 从射线的原点到触碰点的距离。 |
lightmapCoord | The uv lightmap coordinate at the impact
point. 在触碰点的UV光照贴图的坐标。 |
normal | The normal of the surface the ray hit. 射线触碰表面的法线。 |
point | The impact point in world space where the ray hit the
collider. 在世界坐标空间,射线碰到碰撞器的接触点。 |
rigidbody | The Rigidbody of the collider that was hit. If the collider is
not attached to a rigidbody then it is
null. 碰到的该碰撞器上的刚体。如果碰撞器上没有附加刚体,那么返回null。 |
textureCoord | The uv texture coordinate at the impact point. 在触碰点的UV纹理坐标。 |
textureCoord2 | The secondary uv texture coordinate at the impact
point. 在接触点处的第二套UV纹理坐标。 |
transform | The Transform of the rigidbody or collider that was
hit. 碰到的该刚体或碰撞器的变换。 |
triangleIndex | The index of the triangle that was hit. 碰到的三角形的索引。 |
标签:纹理 tab www 变换 search war raycast ros ace
原文地址:http://www.cnblogs.com/lanrenqilanming/p/6598934.html