Skip to main content

off

Stop listening for proximity action triggered events.

Syntax

proximityAction.off(callback);

Parameters

NameTypeDescription
callback(event: ProximityActionEvent) => voidCallback function to stop listening for events.

Example

const proximityAction = engine.world.createProximityAction();

const callback = proximityAction.on(event => {
console.log('Proximity action triggered!', event);
});

// Later, when you want to stop listening for proximity action events:
proximityAction.off(callback);

Available on: Client