0
\$\begingroup\$

I am new to phaser. So I started working on a game but I am stuck at implementing collision detection. I want to do it between a static group(dot) and a Sprite(obs).

function create(){

dot = this.physics.add.staticGroup(dotx, doty, 'dot'); dot.create(dotx, doty, 'dot'); obs = this.physics.add.sprite(obsX, obsY, 'obs'); this.physics.add.collider(obs, ball, alert, null, this);

}

\$\endgroup\$
2
  • \$\begingroup\$ How does your current code behave? How does this differ from how you want it to behave? \$\endgroup\$ Commented Dec 29, 2018 at 18:44
  • \$\begingroup\$ Currently the code shows no error but when I run the game the objects pass over each other without the collision detection taking place. \$\endgroup\$ Commented Dec 30, 2018 at 0:41

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.