This is for other people who may have trouble understanding:
The anchor point of a sprite, is where the local coordinate system of children of that sprite begins. So if the anchor point is the center of a sprite, then (0,0) of child nodes corresponds to the center of the parent sprite.
In the case of a CGRect
, you normally specify the origin of the CGRect
(as the lower left corner of the rect), and then specify the dimensions.
Since you may be creating an SKShapeNode
or SKPhysicsBody
ellipse or rectangle using CGRect
, you should offset it, so the center of the rect matches the center of the sprite, so that the shape and the physics body are in the expected position.