我按照文档的示例学习使用tween,代码如下
cc.tween(node).to(1, {position: {
value: cc.v3(),
process: (start, end, current, ratio) => {
return start + (end - start) * ratio;
}
}
}).start();
运行时报错:
Can not animate position property, because it do not have [lerp, (add|mul), clone] function.
请问这个问题怎么解决?
to里面加上, { easing: ‘sineOutIn’},sineOutIn是动画插值,还有其他的
但我想自己计算路径怎么办?如何使用process不报错?
不好意思,文档有误,是 progress,不是 process 哦。。
现在可以了,谢谢