MXPain Posted August 9, 2014 Share Posted August 9, 2014 Hi guys, I'm trying to make a conveyor belt in contact with which the hero would begin to rollvar 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 More sharing options...
MXPain Posted August 9, 2014 Author Share Posted August 9, 2014 I'm sorry everything works fine, there was a small syntax error, leave the subject code may be useful to someone)) Link to comment Share on other sites More sharing options...
Recommended Posts