Skip to main content

PhysicSphere

Describes a Sphere in space for physical calculations. Used for SphereCast and more.

Members

Properties

NameDescription
PhysicSphere.directionThe direction into which to sweep the sphere.
PhysicSphere.layerMaskA Layer mask that is used to selectively ignore colliders when casting a capsule. Default Physics.DefaultRaycastLayers.
PhysicSphere.maxDistanceThe max length of the cast. Default Mathf.Infinity.
PhysicSphere.originThe center of the sphere at the start of the sweep.
PhysicSphere.queryTriggerInteractionSpecifies whether this query should hit Triggers. Default QueryTriggerInteraction.UseGlobal.
PhysicSphere.radiusThe radius of the sphere.

Constructor

NameDescription
PhysicSphere(origin, radius, direction)Constructs new PhysicSphere.