File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -116,8 +116,9 @@ var Vertex = new Class({
116116 * @param {Phaser.Math.Matrix4 } transformMatrix - The transform matrix to apply to this vertex.
117117 * @param {number } width - The width of the parent Mesh.
118118 * @param {number } height - The height of the parent Mesh.
119+ * @param {number } cameraZ - The z position of the MeshCamera.
119120 */
120- transformCoordinatesLocal : function ( transformMatrix , width , height )
121+ transformCoordinatesLocal : function ( transformMatrix , width , height , cameraZ )
121122 {
122123 var x = this . x ;
123124 var y = this . y ;
@@ -132,7 +133,15 @@ var Vertex = new Class({
132133
133134 this . vx = ( tx / tw ) * width ;
134135 this . vy = - ( ty / tw ) * height ;
135- this . vz = ( tz / tw ) ;
136+
137+ if ( cameraZ <= 0 )
138+ {
139+ this . vz = ( tz / tw ) ;
140+ }
141+ else
142+ {
143+ this . vz = - ( tz / tw ) ;
144+ }
136145 } ,
137146
138147 /**
You can’t perform that action at this time.
0 commit comments