想实现一个人物拾取了一个金币,然后金币就往屏幕上方的一个位置飞去,2D项目(3.6.2),用了如下代码,不知道为何,金币有缩放效果,但是没有移动。其中的endPos 是那个终点位置的this.node.getPostion获取到的。但貌似获取到的是节点坐标,是不是应该作什么转换昵?
tween().target(coin).to(1, { postion: this.endPos })
.to(1, { scale: new Vec2(0.1, 0.1), rotation: Quat.IDENTITY }).union().call(() => { coin.destroy(); }).start();