Anchorpoint on SKShapeNode or something else

2019-09-01 04:52发布

问题:

I can't figure out how to make the anchorpoint in my SKShapeNode that is probably set to (0.5,0.0) to (0,0) since when my game draws the path the coordinate system is not working right...

Thanks for the help

回答1:

SKShapeNode does not have an anchorPoint.

LearnCocos2D answered on this issue:

When you use an image you may need to align it on its node's position. There's no other way to do so but through anchorPoint because the image itself can't be modified (not easily anyway).

When you create a shape you have full control over the alignment of the shape through CGPath. You can simply translate the path to change the shape's alignment relative to the node's position.

This is my interpretation, not fact.

Original answer here.