# Arcade Physics Jump through platform

**URL:** <https://phaser.discourse.group/t/arcade-physics-jump-through-platform/1461>\
**Category:** Phaser 3\
**Created:** [March 1, 2019, 12:34am UTC](https://phaser.discourse.group/t/arcade-physics-jump-through-platform/1461 "2019-03-01T00:34:35Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Legomite](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/legomite/32/92_2.png) [@Legomite](https://phaser.discourse.group/u/Legomite)\
**Post date:** [March 1, 2019, 12:34am UTC](https://phaser.discourse.group/t/arcade-physics-jump-through-platform/1461/1 "2019-03-01T00:34:35Z")

</div>

Hi, I have a platform that I would like the player to be able to jump through/stand on. I already got most of the functionality by changing the collisions of the sides and only enabling “top” to collide, however I’m confused on how the player can go back down again if wanted to. I would like to jump down through the platform. Is this possible with Arcade Physics??

---

<div class="post-metadata">

**Author:** ![Olf](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/olf/32/213_2.png) [@Olf](https://phaser.discourse.group/u/Olf)\
**Post date:** [March 1, 2019, 1:44pm UTC](https://phaser.discourse.group/t/arcade-physics-jump-through-platform/1461/2 "2019-03-01T13:44:03Z")

</div>

Hi,

Don’t worry, you can almost always code a solution. For examples :

1. You can set the position of the player a few pixels lower, he should fall through the platform
2. You can skip collisions with platforms for a few frames, just the time for the player to fall using [processCallback on the Collider](https://photonstorm.github.io/phaser3-docs/Phaser.Physics.Arcade.Collider.html#processCallback__anchor). Let’s say you add a member `standing` on the player, with a value of `true` by default. On a collision, the collider checks this variable before separating bodies. On a key press, you change the value of `standing` to `false`, so collisions will be skipped. 500 ms later, you change back the value to `true` (here I will let you use your favorite method to manage timing).
3. By another better way I am eager to discover

---

<div class="post-metadata">

**Author:** ![bradydowling](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/bradydowling/32/1146_2.png) [@bradydowling](https://phaser.discourse.group/u/bradydowling)\
**Post date:** [July 22, 2019, 1:15am UTC](https://phaser.discourse.group/t/arcade-physics-jump-through-platform/1461/3 "2019-07-22T01:15:33Z")

</div>

> [@Legomite](#):
>
> only enabling “top” to collide

How exactly do you do this? I’m working on trying to get this first part (allowing players to jump up through platforms) but have only got collisions happening on all sides of the tiles right now.

---

<div class="post-metadata">

**Author:** ![bradydowling](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/bradydowling/32/1146_2.png) [@bradydowling](https://phaser.discourse.group/u/bradydowling)\
**Post date:** [July 22, 2019, 12:39pm UTC](https://phaser.discourse.group/t/arcade-physics-jump-through-platform/1461/4 "2019-07-22T12:39:05Z")

</div>

To clarify, I can see [these Tile docs](https://photonstorm.github.io/phaser3-docs/Phaser.Tilemaps.Tile.html#collideDown__anchor) but I’m not sure where to apply that property. I tried setting `collideDown` to false as a tile property in Tiled but that didn’t work.

I’m guessing I can apply this property to an array of tile objects that I have in the layer I care about but I can’t find an array like this anywhere that’s relatively easy to access. I thought it would be available in the layer object but haven’t been able to find it yet.

---

<div class="post-metadata">

**Author:** ![Legomite](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/legomite/32/92_2.png) [@Legomite](https://phaser.discourse.group/u/Legomite)\
**Post date:** [July 23, 2019, 2:33am UTC](https://phaser.discourse.group/t/arcade-physics-jump-through-platform/1461/5 "2019-07-23T02:33:42Z")

</div>

Off the top of my head, I think it’s something like `body.checkCollision.left = false; body.checkCollision.right = false; body.checkCollision.bottom = false`

---

<div class="post-metadata">

**Author:** ![Mikko\_Torniainen](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/mikko_torniainen/32/682_2.png) [@Mikko\_Torniainen](https://phaser.discourse.group/u/Mikko_Torniainen)\
**Post date:** [September 5, 2019, 10:17pm UTC](https://phaser.discourse.group/t/arcade-physics-jump-through-platform/1461/6 "2019-09-05T22:17:59Z")

</div>

This is the simple syntax:  
tile.setCollision(false, false, true, false); // left, right, up, down

---

<div class="post-metadata">

**Author:** ![lacunahag](https://avatars.discourse-cdn.com/v4/letter/l/278dde/32.png) [@lacunahag](https://phaser.discourse.group/u/lacunahag)\
**Post date:** [April 20, 2020, 2:10am UTC](https://phaser.discourse.group/t/arcade-physics-jump-through-platform/1461/7 "2020-04-20T02:10:32Z")

</div>

In case any other google searchers are wondering:

The tiles can be accessed in `Tilemap.layer.data.` For example:

```javascript
    const level = this.map.createStaticLayer(0, tileset, 0, 0)

    const tileCollisions = [0, 1, 2, 3] // designate which tiles in the tileset you want to make collideable
    
    level.layer.data.forEach(function (row) {
      row.forEach(function (tile) {
        if (tileCollisions.includes(tile.index)) {
          tile.collideDown = false
          tile.collideLeft = false
          tile.collideRight = false
          tile.collideUp = true
          // or less verbosely:
          // tile.setCollision(false, false, true, false)
        }
      })
    })

```
