kriket Posted September 8, 2015 Share Posted September 8, 2015 ground = groundGroup.create(0,0,'ramp');game.physics.p2.enable(ground,true, true);// Clear the shapes and load the 'ramp' polygon from the physicsData JSON file in the cacheground.body.clearShapes();ground.body.loadPolygon('physicsData', 'ramp'); So we loaded a polygon but we only want the "ramp" sprite ground = groundGroup.create(0,0,'ramp'); to be shown in the scene and not the polygon body fromground.body.loadPolygon('physicsData', 'ramp');How to turn that off. Polygon body is needed since phaser/p2 only have setCircle and setRectangle as the collision body shapes and we want a custom collision bounding box shape. Link to comment Share on other sites More sharing options...
icp Posted September 8, 2015 Share Posted September 8, 2015 game.physics.p2.enable(ground,false, true);You have the debug parameter set to true, set it to false. kriket and harishkumarvijay 1 1 Link to comment Share on other sites More sharing options...
Recommended Posts