Jump to content

p2 SurfaceVelocity


MXPain
 Share

Recommended Posts

Hi guys, I'm trying to make a conveyor belt in contact with which the hero would begin to roll

var mat1 = game.physics.p2.createMaterial('hero_material', hero_b.body);var mat2 = game.physics.p2.createMaterial('transp_material', obj.body);var contactMaterial = game.physics.p2.createContactMaterial(mat1, mat2);contactMaterial.surfaceVelocity = 100;this.physics.p2.world.addContactMaterial(contactMaterial);

I wrote this code but it does not work, please help to understand what I'm doing wrong.

 

Cheers

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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