Yan 还有这样做的话相机跟随没对呢,麻烦看下这样写有问题吗
var newPos:Laya.Vector3 = this.sp3Role.transform.position;
if (KeyBoardManager.hasKeyDown(Keyboard.W)) {
this.spRole.y -= 1;
// newPos.y += 0.1;
this.rotateRole(this.rotationW);
//转换2D屏幕坐标系统到3D正交投影下的坐标系统
this._camera.convertScreenCoordToOrthographicCoord(new Vector3(this.spRole.x, this.spRole.y, 0), newPos);
this.sp3Role.transform.position = newPos;
this._camera.transform.position = newPos;
}