You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/physics/arcade/GetOverlapX.js
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,8 @@
7
7
varCONST=require('./const');
8
8
9
9
/**
10
-
* Calculates and returns the horizontal overlap between two arcade physics bodies and set their properties accordingly,including:`touching.left`,`touching.right`,`touching.none` and `overlapX'.
10
+
* Calculates and returns the horizontal overlap between two arcade physics bodies and sets their properties
11
+
* accordingly, including: `touching.left`, `touching.right`, `touching.none` and `overlapX'.
11
12
*
12
13
* @function Phaser.Physics.Arcade.GetOverlapX
13
14
* @since 3.0.0
@@ -17,7 +18,7 @@ var CONST = require('./const');
17
18
* @param {boolean} overlapOnly - Is this an overlap only check, or part of separation?
18
19
* @param {number} bias - A value added to the delta values during collision checks. Increase it to prevent sprite tunneling(sprites passing through another instead of colliding).
* @param {Phaser.Physics.Arcade.Body} body1 - The first Body to separate.
17
+
* @param {Phaser.Physics.Arcade.Body} body2 - The second Body to separate.
18
+
* @param {boolean} overlapOnly - Is this an overlap only check, or part of separation?
19
+
* @param {number} bias - A value added to the delta values during collision checks. Increase it to prevent sprite tunneling(sprites passing through another instead of colliding).
Copy file name to clipboardExpand all lines: src/physics/arcade/SeparateX.js
+10-6Lines changed: 10 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -7,17 +7,21 @@
7
7
varGetOverlapX=require('./GetOverlapX');
8
8
9
9
/**
10
-
* [description]
10
+
* Separates two overlapping bodies on the X-axis (horizontally).
11
+
*
12
+
* Separation involves moving two overlapping bodies so they don't overlap anymore and adjusting their velocities based on their mass. This is a core part of collision detection.
13
+
*
14
+
* The bodies won't be separated if there is no horizontal overlap between them, if they are static, or if either one uses custom logic for its separation.
0 commit comments