Version: 2022.3

SpherecastCommandConstructor

切换到手册
public SpherecastCommand (Vector3 origin, float radius, Vector3 direction, QueryParameters queryParameters, float distance);

参数

origin 球体投射的起点。
radius 投射球体的半径。
direction 球体投射的方向。
queryParameters Structure for specifying additional parameters for a batch query such as layer mask, hit triggers and hit backfaces.
distance 投射应检查碰撞的最大距离。

描述

创建 SpherecastCommand。

The command is run in the default physics scene.


public SpherecastCommand (PhysicsScene physicsScene, Vector3 origin, float radius, Vector3 direction, QueryParameters queryParameters, float distance);

参数

physicsScene The physics scene to run the command in.
origin 球体投射的起点。
radius 投射球体的半径。
direction 球体投射的方向。
queryParameters Structure for specifying additional parameters for a batch query such as layer mask, hit triggers and hit backfaces.
distance 投射应检查碰撞的最大距离。

描述

创建 SpherecastCommand。


Obsolete public SpherecastCommand (Vector3 origin, float radius, Vector3 direction, float distance, int layerMask);

参数

origin 球体投射的起点。
radius 投射球体的半径。
direction 球体投射的方向。
distance 投射应检查碰撞的最大距离。
layerMask 用于在投射球体时有选择地忽略碰撞体的 LayerMask

描述

创建 SpherecastCommand。

The command is run in the default physics scene.


Obsolete public SpherecastCommand (PhysicsScene physicsScene, Vector3 origin, float radius, Vector3 direction, float distance, int layerMask);

参数

physicsScene The physics scene to run the command in.
origin 球体投射的起点。
radius 投射球体的半径。
direction 球体投射的方向。
distance 投射应检查碰撞的最大距离。
layerMask 用于在投射球体时有选择地忽略碰撞体的 LayerMask

描述

创建 SpherecastCommand。