off
Stop listening for proximity action triggered events.
Syntax
proximityAction.off(callback);
Parameters
Name | Type | Description |
---|---|---|
callback | (event: ProximityActionEvent) => void | Callback 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