Skip to content

ColshapeManager ​

@vimp-mp/types 2.0.1

Interface · Client API

Creates client-local colshapes and tracks server-owned trigger volumes.

ts
interface ColshapeManager

Members ​

all ​

ts
readonly all: Array<Colshape>

All known non-destroyed colshapes.

count ​

ts
readonly count: number

Number of known non-destroyed colshapes.

createCircle ​

ts
createCircle(position: Vec3 | Vec2, radius: number, options?: ColshapeCreateOptions): Colshape

Creates a client-local two-dimensional circular trigger volume.

createCuboid ​

ts
createCuboid(position: Vec3, size: Vec3, options?: ColshapeCreateOptions): Colshape

Creates a client-local axis-aligned cuboid trigger volume.

createCylinder ​

ts
createCylinder(position: Vec3, radius: number, height: number, options?: ColshapeCreateOptions): Colshape

Creates a client-local vertical cylindrical trigger volume.

createSphere ​

ts
createSphere(position: Vec3, radius: number, options?: ColshapeCreateOptions): Colshape

Creates a client-local spherical trigger volume.

destroy ​

ts
destroy(id: number): boolean

Destroys the client-local colshape identified by its wrapper id.

getById ​

ts
getById(id: number): Colshape | null

Returns a known colshape by client-local wrapper id.

getByRemoteId ​

ts
getByRemoteId(remoteId: number): Colshape | null

Returns a remote colshape by server/network id.

VIMP developer documentation