SpherecastCommand
Creates a SpherecastCommand.
Read time 2 minutesLast updated 4 days ago
Definition
- Type: Constructor
- Namespace: UnityEngine
- Assembly: UnityEngine.PhysicsModule
SpherecastCommand(Vector3, float, Vector3, QueryParameters, float)
Creates a SpherecastCommand.
public SpherecastCommand(Vector3 origin, float radius, Vector3 direction, QueryParameters queryParameters, float distance = 3.4028235E+38)
Parameters
The starting point of the sphere cast.
The radius of the casting sphere.
The direction of the sphere cast.
Structure for specifying additional parameters for a batch query such as layer mask, hit triggers and hit backfaces.
The maximum distance the cast should check for collisions.
Remarks
The command is run in the default physics scene.
SpherecastCommand(PhysicsScene, Vector3, float, Vector3, QueryParameters, float)
Creates a SpherecastCommand.
public SpherecastCommand(PhysicsScene physicsScene, Vector3 origin, float radius, Vector3 direction, QueryParameters queryParameters, float distance = 3.4028235E+38)
Parameters
The physics scene to run the command in.
The starting point of the sphere cast.
The radius of the casting sphere.
The direction of the sphere cast.
Structure for specifying additional parameters for a batch query such as layer mask, hit triggers and hit backfaces.
The maximum distance the cast should check for collisions.
SpherecastCommand(Vector3, float, Vector3, float, int)
Creates a SpherecastCommand.
public SpherecastCommand(Vector3 origin, float radius, Vector3 direction, float distance = 3.4028235E+38, int layerMask = -5)
Parameters
Remarks
The command is run in the default physics scene.
SpherecastCommand(PhysicsScene, Vector3, float, Vector3, float, int)
Creates a SpherecastCommand.
public SpherecastCommand(PhysicsScene physicsScene, Vector3 origin, float radius, Vector3 direction, float distance = 3.4028235E+38, int layerMask = -5)
Parameters
The physics scene to run the command in.
The starting point of the sphere cast.
The radius of the casting sphere.
The direction of the sphere cast.
The maximum distance the cast should check for collisions.