Jump to content

Search the Community

Showing results for tags 'collides'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 3 results

  1. Hi there I'm learning up on how P2 collision groups work and I have a question. It seems that if I have two collision groups, one for the player and one for platforms, to get the two to interact I have to write: this.ground.body.collides(playerCollisionGroup);this.player.body.collides(groundCollisionGroup);If I just use one of those statements the collisions don't work, I have to use both. This seems a little strange - if ground is set to collide with player, why do I also have to set the player to collide with ground? It seems a little redundant. Is there a reason it has to be bound twice? Rich is a heck of a lot smarter than me so I assume I'm just missing a very good reason for this Cheers!
  2. Hi all, I have some issues with CollisionGroups ( I used to use them for ImpactEvents and am starting to wonder if there are not made just for that) I'll try to make it short and clear : Let's take two collision groups : var playerGroup = game.physics.p2.createCollisionGroup();var groundGroup = game.physics.p2.createCollisionGroup();Now let's take two sprites (assume they are created and physics is enabled) and set their collision groups: player.body.setCollisionGroup(playerGroup);ground.body.setCollisionGroup(groundGroup);With that if I want to enable collisions between these two sprites, I have to do this : player.body.collides(groundGroup);ground.body.collides(playerGroup);So here is the issue : if I put just one of these line, nothing happens. Isn't it enough to tell one body or the other to collide? It seems redundant to me. If that's the way it is, I'll deal with it, but I want to be sure I'm not making any mistake here Thanks
  3. In version 1.1.6 it was possible to use overlap in collisions. There is something similar in the physics system p2? Now I use to define collision the "collides" function: collides (group, callback, callbackContext, shape) The problem is that the player can walk over enemies for example.
×
×
  • Create New...