Quantcast
Viewing all articles
Browse latest Browse all 89199

坐标系转换之后位置变了 是为什么

@849442496 写道:

        let cardnode = this.StartCardList[i];//一个NODE
        let worldpoint = cardnode.convertToWorldSpace(cc.v2(0, 0));//转世界坐标
        let point = this.node.convertToNodeSpace(worldpoint);
        cardnode.setParent(this.node);
        cardnode.setPosition(point);

通过这个代码之后node的位置会下移一点

帖子: 1

参与者: 1

阅读整个主题


Viewing all articles
Browse latest Browse all 89199

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>