@@ -28,17 +28,17 @@ var GetOverlapY = require('./GetOverlapY');
2828 */
2929var SeparateY = function ( body1 , body2 , overlapOnly , bias )
3030{
31- console . log ( '' ) ;
32- console . log ( '%c frame ' + body1 . world . _frame + ' ' , 'background-color: orange' ) ;
33- console . log ( 'body1:' , body1 . gameObject . name , 'vs body2:' , body2 . gameObject . name ) ;
34- console . log ( 'pre-GetOverlap by = body1' , body1 . y , 'body2' , body2 . y ) ;
35- console . log ( 'pre-GetOverlap gy = body1' , body1 . gameObject . y , 'body2' , body2 . gameObject . y ) ;
31+ // console.log('');
32+ // console.log('%c frame ' + body1.world._frame + ' ', 'background-color: orange');
33+ // console.log('body1:', body1.gameObject.name, 'vs body2:', body2.gameObject.name);
34+ // console.log('pre-GetOverlap by = body1', body1.y, 'body2', body2.y);
35+ // console.log('pre-GetOverlap gy = body1', body1.gameObject.y, 'body2', body2.gameObject.y);
3636
3737 var collisionInfo = GetOverlapY ( body1 , body2 , overlapOnly , bias ) ;
3838
3939 // console.log(collisionInfo);
40- console . log ( 'post-GetOverlap by = body1' , body1 . y , 'body2' , body2 . y ) ;
41- console . log ( 'post-GetOverlap gy = body1' , body1 . gameObject . y , 'body2' , body2 . gameObject . y ) ;
40+ // console.log('post-GetOverlap by = body1', body1.y, 'body2', body2.y);
41+ // console.log('post-GetOverlap gy = body1', body1.gameObject.y, 'body2', body2.gameObject.y);
4242
4343 var overlap = collisionInfo . overlapY ;
4444 var topFace = collisionInfo . face === CONST . FACING_UP ;
@@ -54,7 +54,7 @@ var SeparateY = function (body1, body2, overlapOnly, bias)
5454 var body1Immovable = ( body1 . physicsType === CONST . STATIC_BODY || body1 . immovable ) ;
5555 var body2Immovable = ( body2 . physicsType === CONST . STATIC_BODY || body2 . immovable ) ;
5656
57- console . log ( 'body1 overlaps body2 across the' , ( ( topFace ) ? 'top' : 'bottom' ) , 'by' , overlap , 'px' ) ;
57+ // console.log('body1 overlaps body2 across the', ((topFace) ? 'top' : 'bottom'), 'by', overlap, 'px');
5858
5959 // Can't separate two immovable bodies, or a body with its own custom separation logic
6060 if ( ! intersects || overlapOnly || ( body1Immovable && body2Immovable ) || body1 . customSeparateY || body2 . customSeparateY )
@@ -185,7 +185,7 @@ var SeparateY = function (body1, body2, overlapOnly, bias)
185185 return true ;
186186 }
187187
188- // FLip flop?
188+ // Flip flop?
189189 var flip1 = ( v1 < 0 && ny1 > 0 ) || ( v1 > 0 && ny1 < 0 ) ;
190190 var flip2 = ( v2 < 0 && ny2 > 0 ) || ( v2 > 0 && ny2 < 0 ) ;
191191
0 commit comments