I’m starting to learn Phaser, so this is a very beginner’s question.
I’m trying to set up a collision between bullet and target. When the collision happens, I want the bullet to disappear and the target to stay where it is.
What I’m doing is:
scene.physics.add.collider(target, bullet, doCollision);
And then
function doCollision() {
bullet.disableBody(true, true);
}
When the collision happens though, target bounces away. How do I prevent that from happening?