sm.physics.capsuleHasContact

Returns true if any collision object is found inside a given capsule.

Kind: Function

Environments: Game

Game

sm.physics.capsuleHasContact( from, to, radius, mask )

Open the full Game reference

Faster than capsuleContactCount when only checking for existence.

The capsule is formed by connecting two spheres.

Parameters:

Name Type Description
from Vec3 The world position of the first sphere.
to Vec3 The world position of the second sphere.
radius number The radius of the spheres.
mask (optional) integer The collision mask. Defaults to sm.physics.filter.default (Optional)

Returns:

Type Description
boolean True if any contact was found.