2D Physics on Procedural Meshes

Hi guys,

I am working on a game, that allows the player to draw 2D polygons, that interact with other physics objects in the world. Everything is constrained to 2D (using the 6DOF physics constraints, constraining x and y rotation and z location). I have a couple of question on the physics side of things:

Do the physics calculations get more performant when constraining the object to certain dimensions? Or are these the same calculations, only more constraint, so that they take roughly the same time?

Can I use Paper2D for my game. I got the impression so far, that Paper2D is aimed at sprites, and although I am making a 2D game, I am on the mesh side of things. No sprites. So: can I apply Paper2D on meshes? especially oprocedural meshes with complex collision? All my triangles that have collisions are parallel to the Z axis (I am 2d in X,Y space), so can I maybe convert them somehow for Paper2D?

I didn’t do a lot of research on the topic, because I generally have the feeling, that Paper2D is not aimed at the kind of game that I’m making, I just wanted to know if I am letting a huge performance boost slip through my fingers due to ignorance.

greetings, Simon

Paper2D is for sprites indeed and won’t be much use for Meshes. You can however mix and Paper2D environment with meshes, the camera doesn’t care.

Try use the predefined physics constraints rather than fix particular axis.

Dimensions should not affect performance, and neither should contraints (minimal), unless you got complex constraints like in ragdolls and inverse kinematics.

I’m not sure how you can approach the drawing of 2D polygons to generate matching collisions. It would definitely have to be a mesh that you create via code once the drawing is done; and it would have a predefined depth. From there, turning on “Complex collision as simple” might do the trick.