SKShapeNode或其他上的锚点

SKShapeNode或其他上的锚点

本文介绍了SKShapeNode或其他上的锚点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法弄清楚如何在我的SKShapeNode中将锚点设置为(0.5,0.0)到(0,0),因为当我的游戏绘制路径时,坐标系无法正常工作...

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...

感谢您的帮助

推荐答案

SKShapeNode没有anchorPoint.

SKShapeNode does not have an anchorPoint.

LearnCocos2D对此问题进行了回答:

LearnCocos2D answered on this issue:

创建形状时,可以通过CGPath完全控制形状的对齐方式.您可以简单地平移路径以更改形状相对于节点位置的对齐方式.

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.

原始答案此处.

这篇关于SKShapeNode或其他上的锚点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-21 09:14