first all. thks for your code for community. this is my first post about phaser3. I had an “affair” with phsaer1 in the past.
ok., I am checking again phaser3, and I am making the tutorial . I have collision with 2 objects when they are working with keyboards, but If I maje it “draggable” there is not collision. How could I meke possible this collision ?
thks in advance
function create ()
{
obstaculo = this.physics.add.staticGroup();
obstaculo.create(400, 568, 'obstaculo');
player = this.physics.add.sprite(100, 450, 'player');
player.setBounce(0.2);
player.setInteractive();
this.input.setDraggable(player);
this.input.on('drag', function (pointer, gameObject, dragX, dragY) {
gameObject.x = dragX;
gameObject.y = dragY;
});
player.setCollideWorldBounds(true);
this.physics.add.collider(player, obstaculo);
}