Closed poasher closed 6 years ago
It's optional if you don't specify the shape. If you do, it's not optional. There's no way to reflect both variations in just the data-types / defs.
Docs updated to reflect the requirement.
@photonstorm Just for my own understanding - why do you need a callback if you provide a shape? Should I be doing anything in the callback?
Edit: Nevermind - I understand from here: https://phaser.io/phaser3/devlog/120
callback is marked as an optional parameter Typescipt setInteractive(shape?: any, callback?: HitAreaCallback, dropZone?: boolean): Phaser.GameObjects.GameObject;
input.hitAreaCallback is not a function at InputManager.pointWithinHitArea at InputManager.hitTest at InputPlugin.hitTestPointer