Version: 2022.3

CapsulecastCommandConstructor

切换到手册
public CapsulecastCommand (Vector3 p1, Vector3 p2, float radius, Vector3 direction, QueryParameters queryParameters, float distance);

参数

p1 胶囊体在 start 处的球体中心。
p2 胶囊体在 end 处的球体中心。
radius 胶囊体的半径。
direction 胶囊体投射的方向。
queryParameters Structure for specifying additional parameters for a batch query such as layer mask, hit triggers and hit backfaces.
distance 扫射的最大长度。

描述

创建 CapsulecastCommand。

This command is run in the default physics scene.


public CapsulecastCommand (PhysicsScene physicsScene, Vector3 p1, Vector3 p2, float radius, Vector3 direction, QueryParameters queryParameters, float distance);

参数

physicsScene The physics scene to run the command in.
p1 胶囊体在 start 处的球体中心。
p2 胶囊体在 end 处的球体中心。
radius 胶囊体的半径。
direction 胶囊体投射的方向。
queryParameters Structure for specifying additional parameters for a batch query such as layer mask, hit triggers and hit backfaces.
distance 扫射的最大长度。

描述

创建 CapsulecastCommand。


Obsolete public CapsulecastCommand (Vector3 p1, Vector3 p2, float radius, Vector3 direction, float distance, int layerMask);

参数

p1 胶囊体在 start 处的球体中心。
p2 胶囊体在 end 处的球体中心。
radius 胶囊体的半径。
direction 胶囊体投射的方向。
distance 扫射的最大长度。
layerMask 用于在投射胶囊体时有选择地忽略碰撞体的 LayerMask

描述

创建 CapsulecastCommand。

This command is run in the default physics scene.


Obsolete public CapsulecastCommand (PhysicsScene physicsScene, Vector3 p1, Vector3 p2, float radius, Vector3 direction, float distance, int layerMask);

参数

physicsScene The physics scene to run the command in.
p1 胶囊体在 start 处的球体中心。
p2 胶囊体在 end 处的球体中心。
radius 胶囊体的半径。
direction 胶囊体投射的方向。
distance 扫射的最大长度。
layerMask 用于在投射胶囊体时有选择地忽略碰撞体的 LayerMask

描述

创建 CapsulecastCommand。