기술 자료

Unity Engine

Unity Engine

CapsulecastCommand

Creates a CapsulecastCommand.
읽는 시간 2분최근 업데이트: 한 달 전

Definition

  • Type: Constructor
  • Namespace: UnityEngine
  • Assembly: UnityEngine.PhysicsModule

CapsulecastCommand(Vector3, Vector3, float, Vector3, QueryParameters, float)

Creates a CapsulecastCommand.
public CapsulecastCommand(Vector3 p1, Vector3 p2, float radius, Vector3 direction, QueryParameters queryParameters, float distance = 3.4028235E+38)

Parameters

The center of the sphere at the start of the capsule.

The center of the sphere at the end of the capsule.

radius

The radius of the capsule.

direction

The direction of the capsule cast.

queryParameters

Structure for specifying additional parameters for a batch query such as layer mask, hit triggers and hit backfaces.

distance

The maximum length of the sweep.

Remarks

This command is run in the default physics scene.

CapsulecastCommand(PhysicsScene, Vector3, Vector3, float, Vector3, QueryParameters, float)

Creates a CapsulecastCommand.
public CapsulecastCommand(PhysicsScene physicsScene, Vector3 p1, Vector3 p2, float radius, Vector3 direction, QueryParameters queryParameters, float distance = 3.4028235E+38)

Parameters

physicsScene

The physics scene to run the command in.

The center of the sphere at the start of the capsule.

The center of the sphere at the end of the capsule.

radius

The radius of the capsule.

direction

The direction of the capsule cast.

queryParameters

Structure for specifying additional parameters for a batch query such as layer mask, hit triggers and hit backfaces.

distance

The maximum length of the sweep.

CapsulecastCommand(Vector3, Vector3, float, Vector3, float, int)

Creates a CapsulecastCommand.
경고
Deprecated. This struct signature is no longer supported. Use struct with a QueryParameters instead
public CapsulecastCommand(Vector3 p1, Vector3 p2, float radius, Vector3 direction, float distance = 3.4028235E+38, int layerMask = -5)

Parameters

The center of the sphere at the start of the capsule.

The center of the sphere at the end of the capsule.

radius

The radius of the capsule.

direction

The direction of the capsule cast.

distance

The maximum length of the sweep.

layerMask

The LayerMask that selectively ignores Colliders when casting a capsule.

Remarks

This command is run in the default physics scene.

CapsulecastCommand(PhysicsScene, Vector3, Vector3, float, Vector3, float, int)

Creates a CapsulecastCommand.
경고
Deprecated. This struct signature is no longer supported. Use struct with a QueryParameters instead
public CapsulecastCommand(PhysicsScene physicsScene, Vector3 p1, Vector3 p2, float radius, Vector3 direction, float distance = 3.4028235E+38, int layerMask = -5)

Parameters

physicsScene

The physics scene to run the command in.

The center of the sphere at the start of the capsule.

The center of the sphere at the end of the capsule.

radius

The radius of the capsule.

direction

The direction of the capsule cast.

distance

The maximum length of the sweep.

layerMask

The LayerMask that selectively ignores Colliders when casting a capsule.