1、物体给定某个旋转力度,然后形成旋转。
2、准备
绑定代码:
3、代码实现
@property
readonly USE_ROTATION = false;
private readonly _rot = new Quat();
@property({ visible: function (this: rotation) { return this.USE_ROTATION } })
readonly deltaEuler = new Vec3();
start () {
Quat.fromEuler(this._rot, this.deltaEuler.x, this.deltaEuler.y, this.deltaEuler.z);
}
update(deltaTime: number): void{
this.node.rotate(this._rot, Node.NodeSpace.WORLD);
}