mirror of
https://github.com/photonstorm/phaser
synced 2025-02-16 22:18:29 +00:00
Let them define the orientation
This commit is contained in:
parent
87ed734475
commit
6ce58ed73b
1 changed files with 3 additions and 1 deletions
|
@ -34,6 +34,8 @@ var MeshCamera = new Class({
|
|||
this._position = new Vector3(x, y, z);
|
||||
this._target = new Vector3();
|
||||
|
||||
this.orientation = Vector3.DOWN;
|
||||
|
||||
this.viewMatrix = new Matrix4();
|
||||
this.projectionMatrix = new Matrix4();
|
||||
},
|
||||
|
@ -42,7 +44,7 @@ var MeshCamera = new Class({
|
|||
{
|
||||
this.aspectRatio = width / height;
|
||||
|
||||
this.viewMatrix.lookAt(this._position, this._target, Vector3.UP);
|
||||
this.viewMatrix.lookAt(this._position, this._target, this.orientation);
|
||||
|
||||
this.projectionMatrix.perspective(DegToRad(this._fov), this.aspectRatio, this._near, this._far);
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue