当前位置:网站首页>【Cocos Creator 3.5.1】this. node. Use of getposition (this.\u curpos)

【Cocos Creator 3.5.1】this. node. Use of getposition (this.\u curpos)

2022-06-27 05:44:00 CN-Dust

Usage mode :

this.node.getPosition(this._curPos);

describe :

(method) Node.getPosition(out?: Vec3): Vec3
@en — Get position in local coordinate system, please try to pass out vector and reuse it to avoid garbage.

@zh —  Get local coordinates , Be careful , As far as possible, it is possible to transfer the reused  [[Vec3]]  To avoid garbage .

@param out — Set the result to out vector

@return — If out given, the return value equals to out, otherwise a new vector will be generated and return
原网站

版权声明
本文为[CN-Dust]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/178/202206270534251713.html