this.node.getPosition()返回的cc.Vec3的坐标,但在ts中的类型报错了

默认返回值是Vec2,如果你需要Vec3可以这样写
let a : cc.Vec3;
this.node.getPosition(a);

好的,我试试看,刚开始我是这样写的 this.node.getPosition(“cc.Vec3”);