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
The center of the box.
The half size of the box in each dimension.
The rotation of the box.
The direction in which to sweep the box.
Structure for specifying additional parameters for a batch query such as layer mask, hit triggers and hit backfaces.
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
The physics scene to run the command in.
The center of the box.
The half size of the box in each dimension.
The rotation of the box.
The direction in which to sweep the box.
Structure for specifying additional parameters for a batch query such as layer mask, hit triggers and hit backfaces.
The maximum length of the cast.
BoxcastCommand(Vector3, Vector3, Quaternion, Vector3, float, int)
Creates a BoxcastCommand.
public BoxcastCommand(Vector3 center, Vector3 halfExtents, Quaternion orientation, Vector3 direction, float distance = 3.4028235E+38, int layerMask = -5)
Parameters
The center of the box.
The half size of the box in each dimension.
The rotation of the box.
The direction in which to sweep the box.
The maximum length of the cast.
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.
public BoxcastCommand(PhysicsScene physicsScene, Vector3 center, Vector3 halfExtents, Quaternion orientation, Vector3 direction, float distance = 3.4028235E+38, int layerMask = -5)
Parameters
The physics scene to run the command in.
The center of the box.
The half size of the box in each dimension.
The rotation of the box.
The direction in which to sweep the box.
The maximum length of the cast.
A LayerMask that is used to selectively ignore Colliders when casting a box.