File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ /* jshint camelcase: false */
12/**
23* @author Richard Davey <rich@photonstorm.com>
34* @copyright 2014 Photon Storm Ltd.
@@ -244,16 +245,6 @@ Phaser.Physics.Ninja.AABB.prototype = {
244245 var vx1 = this . pos . x - this . oldpos . x ; // Calc velocity of this object
245246 var vy1 = this . pos . y - this . oldpos . y ;
246247 var dp1 = ( vx1 * dx + vy1 * dy ) ; // Find component of velocity parallel to collision normal
247- var nx1 = dp1 * dx ; // Project velocity onto collision normal
248- var ny1 = dp1 * dy ; // nx, ny is normal velocity
249-
250- var dx2 = dx * - 1 ;
251- var dy2 = dy * - 1 ;
252- var vx2 = obj . pos . x - obj . oldpos . x ; // Calc velocity of colliding object
253- var vy2 = obj . pos . y - obj . oldpos . y ;
254- var dp2 = ( vx2 * dx2 + vy2 * dy2 ) ; // Find component of velocity parallel to collision normal
255- var nx2 = dp2 * dx2 ; // Project velocity onto collision normal
256- var ny2 = dp2 * dy2 ; // nx, ny is normal velocity
257248
258249 // We only want to apply collision response forces if the object is travelling into, and not out of, the collision
259250 if ( this . body . immovable && obj . body . immovable )
@@ -1014,4 +1005,4 @@ Phaser.Physics.Ninja.AABB.prototype = {
10141005 this . system = null ;
10151006 }
10161007
1017- }
1008+ } ;
You can’t perform that action at this time.
0 commit comments