Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


BoxcastCommand

Creates a BoxcastCommand.
Read time 2 minutesLast updated 4 days ago

Definition

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

BoxcastCommand(Vector3, Vector3, Quaternion, Vector3, QueryParameters, float)

Creates a BoxcastCommand.
public BoxcastCommand(Vector3 center, Vector3 halfExtents, Quaternion orientation, Vector3 direction, QueryParameters queryParameters, float distance = 3.4028235E+38)

Parameters

center

The center of the box.

halfExtents

The half size of the box in each dimension.

orientation

The rotation of the box.

direction

The direction in which to sweep the box.

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 cast.

Remarks

This command is run in the default physics scene.

BoxcastCommand(PhysicsScene, Vector3, Vector3, Quaternion, Vector3, QueryParameters, float)

Creates a BoxcastCommand.
public BoxcastCommand(PhysicsScene physicsScene, Vector3 center, Vector3 halfExtents, Quaternion orientation, Vector3 direction, QueryParameters queryParameters, float distance = 3.4028235E+38)

Parameters

physicsScene

The physics scene to run the command in.

center

The center of the box.

halfExtents

The half size of the box in each dimension.

orientation

The rotation of the box.

direction

The direction in which to sweep the box.

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 cast.

BoxcastCommand(Vector3, Vector3, Quaternion, Vector3, float, int)

Creates a BoxcastCommand.
Warning
Deprecated. This struct signature is no longer supported. Use struct with a QueryParameters instead
public BoxcastCommand(Vector3 center, Vector3 halfExtents, Quaternion orientation, Vector3 direction, float distance = 3.4028235E+38, int layerMask = -5)

Parameters

center

The center of the box.

halfExtents

The half size of the box in each dimension.

orientation

The rotation of the box.

direction

The direction in which to sweep the box.

distance

The maximum length of the cast.

layerMask

A LayerMask that is used to selectively ignore Colliders when casting a box.

Remarks

This command is run in the default physics scene.

BoxcastCommand(PhysicsScene, Vector3, Vector3, Quaternion, Vector3, float, int)

Creates a BoxcastCommand.
Warning
Deprecated. This struct signature is no longer supported. Use struct with a QueryParameters instead
public BoxcastCommand(PhysicsScene physicsScene, Vector3 center, Vector3 halfExtents, Quaternion orientation, Vector3 direction, float distance = 3.4028235E+38, int layerMask = -5)

Parameters

physicsScene

The physics scene to run the command in.

center

The center of the box.

halfExtents

The half size of the box in each dimension.

orientation

The rotation of the box.

direction

The direction in which to sweep the box.

distance

The maximum length of the cast.

layerMask

A LayerMask that is used to selectively ignore Colliders when casting a box.