Jump to content

[P2] How to collide with the world bounds harder?


rockcs
 Share

Recommended Posts

Hi everyone,

   I'm new to Phaser, and I'm using P2 for my collision events. Now I'm justing doing a test in which a group of objects colliding with the world boundary.  It works fine but the objects lose a lot of energy and velocity when collides with the world boundary. I just want the objects to bounce back with same speed, like 'setBounce' in arcade. I've tried the following : 

1.  Set the restitution, but I can just see little difference between different restitution values. 

2. Contact Material. I referenced to this page   http://examples.phaser.io/_site/view_full.html?d=p2 physics&f=contact+material.js&t=contact material

    It looks fine but it seems that one contact material contains only one sprite? Is there any way to add a collision group to one contact material?

 

Or are there other ways to do this?

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...