name | type | description |
---|---|---|
x | number |
The left edge. |
y | number |
The upper edge. |
right | number |
The right edge. |
bottom | number |
The lower edge. |
name | type | description |
---|---|---|
none | boolean |
True if the Body is not colliding. |
up | boolean |
True if the Body is colliding on its upper edge. |
down | boolean |
True if the Body is colliding on its lower edge. |
left | boolean |
True if the Body is colliding on its left edge. |
right | boolean |
True if the Body is colliding on its right edge. |
An Arcade Physics Collider Type.
name | type | description |
---|---|---|
object1 | Phaser.Tilemaps.Tile | Phaser.Types.Physics.Arcade.GameObjectWithBody |
The first Game Object. |
object2 | Phaser.Tilemaps.Tile | Phaser.Types.Physics.Arcade.GameObjectWithBody |
The second Game Object. |
name | type | arguments | Default | description |
---|---|---|---|---|
fps | number | <optional> | 60 | |
fixedStep | boolean | <optional> | true | |
timeScale | number | <optional> | 1 | |
gravity | Phaser.Types.Math.Vector2Like | <optional> | ||
x | number | <optional> | 0 |
Sets bounds.x. |
y | number | <optional> | 0 |
Sets bounds.y. |
width | number | <optional> | 0 |
Sets bounds.width. |
height | number | <optional> | 0 |
Sets bounds.height. |
checkCollision | Phaser.Types.Physics.Arcade.CheckCollisionObject | <optional> | ||
overlapBias | number | <optional> | 4 | |
tileBias | number | <optional> | 16 | |
forceX | boolean | <optional> | false | |
isPaused | boolean | <optional> | false | |
debug | boolean | <optional> | false | |
debugShowBody | boolean | <optional> | true |
Sets debugShowBody. |
debugShowStaticBody | boolean | <optional> | true |
Sets debugShowStaticBody. |
debugShowVelocity | boolean | <optional> | true |
Sets debugShowStaticBody. |
debugBodyColor | number | <optional> | 0xff00ff |
Sets bodyDebugColor. |
debugStaticBodyColor | number | <optional> | 0x0000ff |
Sets staticBodyDebugColor. |
debugVelocityColor | number | <optional> | 0x00ff00 |
Sets velocityDebugColor. |
maxEntries | number | <optional> | 16 | |
useTree | boolean | <optional> | true | |
customUpdate | boolean | <optional> | false |
If enabled, you need to call |
name | type | description |
---|---|---|
debugShowBody | boolean |
Set to |
debugShowStaticBody | boolean |
Set to |
debugShowVelocity | boolean |
Set to |
bodyDebugColor | number |
The color of dynamic body outlines when rendered to the debug display. |
staticBodyDebugColor | number |
The color of static body outlines when rendered to the debug display. |
velocityDebugColor | number |
The color of the velocity markers when rendered to the debug display. |
name | type | description |
---|---|---|
minX | number |
The minimum x value used in RTree searches. |
minY | number |
The minimum y value used in RTree searches. |
maxX | number |
The maximum x value used in RTree searches. |
maxY | number |
The maximum y value used in RTree searches. |
name | type | description |
---|---|---|
up | boolean |
Will bodies collide with the top side of the world bounds? |
down | boolean |
Will bodies collide with the bottom side of the world bounds? |
left | boolean |
Will bodies collide with the left side of the world bounds? |
right | boolean |
Will bodies collide with the right side of the world bounds? |
name | type |
---|---|
body | Phaser.Physics.Arcade.Body | Phaser.Physics.Arcade.StaticBody |
name | type | arguments | Default | description |
---|---|---|---|---|
collideWorldBounds | boolean | <optional> | false | |
customBoundsRectangle | Phaser.Geom.Rectangle | <optional> | null |
Sets setBoundsRectangle. |
accelerationX | number | <optional> | 0 |
Sets acceleration.x. |
accelerationY | number | <optional> | 0 |
Sets acceleration.y. |
allowDrag | boolean | <optional> | true | |
allowGravity | boolean | <optional> | true | |
allowRotation | boolean | <optional> | true | |
useDamping | boolean | <optional> | false |
Sets useDamping. |
bounceX | number | <optional> | 0 |
Sets bounce.x. |
bounceY | number | <optional> | 0 |
Sets bounce.y. |
dragX | number | <optional> | 0 |
Sets drag.x. |
dragY | number | <optional> | 0 |
Sets drag.y. |
enable | boolean | <optional> | true |
Sets enable. |
gravityX | number | <optional> | 0 |
Sets gravity.x. |
gravityY | number | <optional> | 0 |
Sets gravity.y. |
frictionX | number | <optional> | 0 |
Sets friction.x. |
frictionY | number | <optional> | 0 |
Sets friction.y. |
maxSpeed | number | <optional> | -1 |
Sets maxSpeed. |
maxVelocityX | number | <optional> | 10000 |
Sets maxVelocity.x. |
maxVelocityY | number | <optional> | 10000 |
Sets maxVelocity.y. |
velocityX | number | <optional> | 0 |
Sets velocity.x. |
velocityY | number | <optional> | 0 |
Sets velocity.y. |
angularVelocity | number | <optional> | 0 | |
angularAcceleration | number | <optional> | 0 | |
angularDrag | number | <optional> | 0 | |
mass | number | <optional> | 0 | |
immovable | boolean | <optional> | false |
name | type | description |
---|---|---|
setCollideWorldBounds | boolean | |
setBoundsRectangle | Phaser.Geom.Rectangle | |
setAccelerationX | number | |
setAccelerationY | number | |
setAllowDrag | boolean | |
setAllowGravity | boolean | |
setAllowRotation | boolean | |
setDamping | boolean | |
setBounceX | number | |
setBounceY | number | |
setDragX | number | |
setDragY | number | |
setEnable | boolean | |
setGravityX | number | |
setGravityY | number | |
setFrictionX | number | |
setFrictionY | number | |
setMaxSpeed | number | |
setVelocityX | number | |
setVelocityY | number | |
setAngularVelocity | number | |
setAngularAcceleration | number | |
setAngularDrag | number | |
setMass | number | |
setImmovable | boolean |