How would you outline levels using box2d?

Let’s say that we had a level like this consisting of two shapes, forget about the text: https://s22.postimg.org/kq7zifu81/likethis.png Would you then create this level using box2d like this: https://s21.postimg.org/jlqt99cjb/asshapes.png (creating and placing different box2d objects on one another) Or like this: https://s3.postimg.org/cylpu1p8j/asline.png (as edges) Pretty simple quesiton i guess but it would still mean a lot to me if you would share some thoughts on this :slight_smile: Thanks!

I don’t do the edge thing that you mention. I place Physics objects on top and set masks for what should happen, etc.

Perfect, and you have not experienced any problems when you place objects right beside or on top of each other?

not as long as I set the masks correctly to get the behavior I want.

1 Like

So if you had a static floor and wanted to place a static box right on top of it in the middle, you would get the x position of the floor and set the x position of the box to that and then get the y position of the floor and plus it with the half of the height of the box and then use that sum as the y position for the box, correct`? Just to be sure

Give that man a cookie.

1 Like

hahahah I know that it is logical… Needed to make sure that I was not doing anything wrong :rowboat: