# Collisions Not Firing?

**URL:** <https://phaser.discourse.group/t/collisions-not-firing/5773>\
**Category:** Phaser 3\
**Created:** [April 4, 2020, 9:29pm UTC](https://phaser.discourse.group/t/collisions-not-firing/5773 "2020-04-04T21:29:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JimmleWomp](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/jimmlewomp/32/3098_2.png) [@JimmleWomp](https://phaser.discourse.group/u/JimmleWomp)\
**Post date:** [April 4, 2020, 9:29pm UTC](https://phaser.discourse.group/t/collisions-not-firing/5773/1 "2020-04-04T21:29:46Z")

</div>

Hi!

I am trying to use collision detection in a phaser3 game, the callback function doesn’t seem to be firing.

First, in my scene I add two sprites:

```
playerFish = this.physics.add.sprite(
      this.game.scale.width / 2,
      this.game.scale.height / 2,
      'fish').setOrigin(0.5) 

```

`const plankton = this.add.sprite(20, 20, 'plankton')`

Then, I add the code for collision detection:

```
this.physics.add.collider(playerFish, plankton, () => {
    console.log('collision!')
}, 
null,
this)

```

I also tried changing “collider” to “overlap” but still not having any luck. I would expect the callback to be triggered and the text “collision!” to be logged to the console, but for some reason nothing happens when these sprites overlap. 🤔

Am I missing something else here to set up the collision detection? Thanks!

---

<div class="post-metadata">

**Author:** ![samme](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/samme/32/5275_2.png) [@samme](https://phaser.discourse.group/u/samme)\
**Post date:** [April 4, 2020, 10:08pm UTC](https://phaser.discourse.group/t/collisions-not-firing/5773/2 "2020-04-04T22:08:52Z")

</div>

`plankton` has no body. Use `this.physics.add.sprite()` there as well.

---

<div class="post-metadata">

**Author:** ![JimmleWomp](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/jimmlewomp/32/3098_2.png) [@JimmleWomp](https://phaser.discourse.group/u/JimmleWomp)\
**Post date:** [April 4, 2020, 10:21pm UTC](https://phaser.discourse.group/t/collisions-not-firing/5773/3 "2020-04-04T22:21:43Z")

</div>

ah, good catch. thanks!
