I have the following code which creates an SKShapeNode
(self.tiles
).
CGMutablePathRef path = CGPathCreateMutable();
.... //Some stuff that creates a path
self.tiles = [SKShapeNode node];
[self addChild:self.tiles];
self.tiles.path = path;
self.tiles.physicsBody = [SKPhysicsBody bodyWithEdgeChainFromPath:path];
But it seems that the physics body that is created does not align with the shape that is created on screen.The SKShapeNode is exactly where I want it on screen (visually).
I have no idea where the physics bodies really are.
How can I align the SKShapeNode
and the SKPhysicsBody
?