Skip to main content

PhysicCapsule

Describes a capsule in space for physical calculations. Used for CapsuleCast.

Members

Properties

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

Constructor

NameDescription
PhysicCapsule(point1, point2, radius, direction)Constructs new PhysicCapsule.