Jump to content

My floor is falling down in 2.0


Recommended Posts

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

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

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