Why SKShapeNode does not have anchor point? [close

2020-03-09 04:15发布

i am trying to understand why SKShapeNode does not have an anchor point ?

1条回答
Explosion°爆炸
2楼-- · 2020-03-09 04:30

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.

查看更多
登录 后发表回答