Skip to content

Api > PhysicCapsule > Constructor


PhysicCapsule(Vector3 point1, Vector3 point2, number radius, Vector3 direction)⚓︎

Constructs new PhysicCapsule.

Parameters:⚓︎

Name Type Description
point1 Vector3 The center of the sphere at the start of the capsule.
point2 Vector3 The center of the sphere at the end of the capsule.
radius number The radius of the capsule.
direction Vector3 The direction into which to sweep the capsule.

Usage⚓︎

---@type Vector3
local point1;

---@type Vector3
local point2;

---@type number
local radius;

---@type Vector3
local direction;


local physiccapsule = PhysicCapsule(point1, point2, radius, direction);