我不知道如何在我的 SKShapeNode 中设置 anchor ,该 anchor 可能设置为 (0.5,0.0) 到 (0,0),因为当我的游戏绘制路径时,坐标系统无法正常工作......
感谢帮助
最佳答案
SKShapeNode 没有 anchor 。
LearnCocos2D 对这个问题的回答:
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.
原始答案here .
关于ios - SKShapeNode 或其他东西上的 anchor ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23531126/