Skip to main content

renderer.isTouchingDrawables()

Checks if a drawable is touching any of the candidate drawables.

Syntax

renderer.isTouchingDrawables(drawableID, candidateIDs)

Parameters

drawableID

Type: number

The ID of the source drawable.

candidateIDs

Type: Array<number> (optional)

Array of drawable IDs to check against. If omitted, checks against all drawables.

Returns

Type: boolean

True if touching any candidate.

Example

const isTouchingAny = renderer.isTouchingDrawables(myDrawableId);

See Also