File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -48,30 +48,28 @@ var MeshCamera = new Class({
4848
4949 panX : function ( v )
5050 {
51- this . updateViewMatrix ( ) ;
52-
5351 this . position . addScale ( this . right , v ) ;
52+
53+ this . updateViewMatrix ( ) ;
5454 } ,
5555
5656 panY : function ( v )
5757 {
58- this . updateViewMatrix ( ) ;
59-
6058 this . position . y += this . up . y * v ;
6159
62- if ( this . mode = == MeshCamera . MODE_ORBIT )
60+ if ( this . mode ! == MeshCamera . MODE_ORBIT )
6361 {
6462 // Can only move up and down the y axix in orbit mode
65- return ;
63+ this . position . x += this . up . x * v ;
64+ this . position . z += this . up . z * v ;
6665 }
6766
68- this . position . x += this . up . x * v ;
69- this . position . z += this . up . z * v ;
67+ this . updateViewMatrix ( ) ;
7068 } ,
7169
7270 panZ : function ( v )
7371 {
74- this . updateViewMatrix ( ) ;
72+ // this.updateViewMatrix();
7573
7674 if ( this . mode === MeshCamera . MODE_ORBIT )
7775 {
@@ -83,6 +81,8 @@ var MeshCamera = new Class({
8381 // In freemode to move forward, we need to move based on our forward which is relative to our current rotation
8482 this . position . addScale ( this . forward , v ) ;
8583 }
84+
85+ this . updateViewMatrix ( ) ;
8686 } ,
8787
8888 // To have different modes of movements, this function handles the view matrix update for the transform object.
You can’t perform that action at this time.
0 commit comments