Merge pull request #1818 from thecodingmachine/fix-character-collider

applied proper offset for circle collider of Character
This commit is contained in:
David Négrier 2022-02-03 10:25:42 +01:00 committed by GitHub
commit 9696b0ab04
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -142,7 +142,7 @@ export abstract class Character extends Container implements OutlineableInterfac
this.clickable = clickable;
if (clickable) {
this.setInteractive({
hitArea: new Phaser.Geom.Circle(0, 0, interactiveRadius),
hitArea: new Phaser.Geom.Circle(8, 8, interactiveRadius),
hitAreaCallback: Phaser.Geom.Circle.Contains, //eslint-disable-line @typescript-eslint/unbound-method
useHandCursor: true,
});