I have 10 square nodes with square physics bodies in a row. How can I best merge these physics bodies to create a single skphysicsbody?
The reason I need to do this is that a square object traveling on top of the square row "trips" at random. If I replace the 10 square nodes with a single rectangle, there's no "tripping" behavior.
My current best guess is this:
Create a superset rectangle, then use SKPhysicsBody(edgeChainFromPath:)
. Then create a node just for physics and add position it somehow in the scene. In more complex scenarios I'll have all sorts of different polygons in two dimensions, so I'm not sure how I would position the physics node.
Is there a better way? If not, how do I position the physics node?