sm.physics.capsuleContactCount

Returns the number of collision objects that are found inside a given capsule.

Kind: Function

Environments: Game

Game

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

Open the full Game reference

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
integer The number of objects.