Yuri Posted November 7, 2015 Report Share Posted November 7, 2015 Below is the code I used to create the floor in Panda.js v1.x The issue I seem to be having in 2.x is that the floor is now affected by physics/gravity and falls down. How could I make it stick in place?this.world = new game.World(0, 2500);var floorBody = new game.Body({ position: { x: game.system.width / 2, y: game.system.height }, collisionGroup: 1});var floorShape = new game.Rectangle(game.system.width, 50);floorBody.addShape(floorShape);this.world.addBody(floorBody); Link to comment Share on other sites More sharing options...
Yuri Posted November 12, 2015 Author Report Share Posted November 12, 2015 It does work by creating the game world with 0 gravity but is there another way? Link to comment Share on other sites More sharing options...
Legomite Posted December 19, 2015 Report Share Posted December 19, 2015 UsefloorBody.static = trueI think it disables movement of a physics body, hope it helps Link to comment Share on other sites More sharing options...
Recommended Posts