let v = 100; let v3 = new Vec3(this.cylinder.forward.x * v, this.cylinder.forward.y * v, this.cylinder.forward.z * v); this.cylinder.getComponent(RigidBody).setLinearVelocity(v3); 速度100,沿forward方向移动(当前节点面向的前方方向,默认前方为 -z 方向)
let v = 100; let v3 = new Vec3(this.cylinder.forward.x * v, this.cylinder.forward.y * v, this.cylinder.forward.z * v); this.cylinder.getComponent(RigidBody).setLinearVelocity(v3); 速度100,沿forward方向移动(当前节点面向的前方方向,默认前方为 -z 方向)
没有回复内容