We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 99f0fb6 commit 42ca43dCopy full SHA for 42ca43d
1 file changed
src/physics/arcade/Body.js
@@ -1046,9 +1046,9 @@ Phaser.Physics.Arcade.Body.prototype = {
1046
* For example: If you have a Sprite with a texture that is 80x100 in size,
1047
* and you want the physics body to be 32x32 pixels in the middle of the texture, you would do:
1048
*
1049
- * `setSize(32, 32, 24, 34)`
+ * `setSize(32 / Math.abs(this.scale.x), 32 / Math.abs(this.scale.y), 24, 34)`
1050
1051
- * Where the first two parameters is the new Body size (32x32 pixels).
+ * Where the first two parameters are the new Body size (32x32 pixels) relative to the Sprite's scale.
1052
* 24 is the horizontal offset of the Body from the top-left of the Sprites texture, and 34
1053
* is the vertical offset.
1054
0 commit comments