Const
The Camera Pan Start Event.
This event is dispatched by a Camera instance when the Pan Effect starts.
Listen for it via either of the following:
this.cameras.main.on('camerapanstart', () => {}); Copy
this.cameras.main.on('camerapanstart', () => {});
or use the constant, to avoid having to remember the correct event string:
this.cameras.main.on(Phaser.Cameras.Scene2D.Events.PAN_START, () => {}); Copy
this.cameras.main.on(Phaser.Cameras.Scene2D.Events.PAN_START, () => {});
The Camera Pan Start Event.
This event is dispatched by a Camera instance when the Pan Effect starts.
Listen for it via either of the following:
or use the constant, to avoid having to remember the correct event string: