since phaser 2.3 Arcade collision not working (group vs group && Sprite vs Sprite)

Recommended Posts

I'm getting stuck with this issue. I've updated my projects from phaser 2.2 to current 2.3.0. and every collision isn't working any more. I'm using the arcade.physics system. Set up is (shortened): the collision handler does not fire.

Group 1this.wave =;this.wave.enableBody = true;this.wave.physicsBodyType = Phaser.Physics.ARCADE;game.physics.enable(this.wave, Phaser.Physics.ARCADE);Group 2this.player =;this.player.enableBody = true;this.player.physicsBodyType = Phaser.Physics.ARCADE;game.physics.enable(this.player, Phaser.Physics.ARCADE);into update func:game.physics.arcade.collide( this.player, this.wave, this.collision, null, this);does not detect anything.Same goes with sprite vs. sprite, worked before.I tried different configurations since there are multiple ways and I do not know which one is actually the most updated:wave_obj.physicsBodyType = Phaser.Physics.ARCADE;game.physics.enable(wave_obj, Phaser.Physics.ARCADE);;game.physics.arcade.enable( wave_obj );console output contains: type: 0 and physicsType: 0 - is that correct?c.Sprite {type: 0, physicsType: 0, position: c.Point, scale: c.Point, transformCallback: null…}

Any ideas? suggestions, I've tried every syntax written above. with phaser 2.2 it worked. 
also tried:

game.physics.startSystem(Phaser.Physics.ARCADE);game.physics.arcade.TOP_BOTTOM;with sprite vs spritegame.physics.enable( [ this.racer, wave_obj ], Phaser.Physics.ARCADE);game.physics.arcade.overlap instead of game.physics.arcade.collide



Share this post

Link to post
Share on other sites

Found the problem, but I wonder that it worked before: this.wave.addChildAt( wave_obj, i_counter );
I just rewrote it to this.wave.add( wave_obj ); <- sprite gets added to group.

this.wave.addChildAt( wave_obj, i_counter ); Does not work but adds the sprites to the group successfully..
so this may be something to fix, or I even misunderstood the usage?

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.