# Player Wont Move Down

**URL:** https://phaser.discourse.group/t/player-wont-move-down/14709
**Category:** Phaser 3
**Created:** [September 6, 2024, 4:38am UTC](https://phaser.discourse.group/t/player-wont-move-down/14709 "2024-09-06T04:38:59Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![vivekchakraverty](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/vivekchakraverty/32/8495_2.png) [@vivekchakraverty](https://phaser.discourse.group/u/vivekchakraverty)
#### Post date: [September 6, 2024, 4:38am UTC](https://phaser.discourse.group/t/player-wont-move-down/14709/1 "2024-09-06T04:38:59Z")

</div>

I have been trying to move down my rocket game object in the following MainScene code, the other keyboard inputs- up, left, right, work as expected but the player refuses to move down:

```javascript
import { Physics } from "phaser"

export default class MainScene extends Phaser.Scene {
  
  private ship!: Phaser.Physics.Arcade.Image

  private cursor!: Phaser.Types.Input.Keyboard.CursorKeys

  constructor() {
    super({ key: 'MainScene' })
  }

  create(){
    //use camera module

    this.cameras.main.setBounds(0, 0, 3392, 240)
    this.physics.world.setBounds(0, 0, 3392, 240)

    const map = this.make.tilemap({key: "map"})

    const tileset = map.addTilesetImage('SuperMarioBros-World1-1', 'tiles1')

    map.createLayer("World1", tileset, 0, 0)

    this.ship = this.physics.add.image(400, 100, 'ship').
    setAngle(90).setCollideWorldBounds(true)

    this.cursor = this.input.keyboard.createCursorKeys() 

    //course section
    //this.cameras.main.startFollow(this.ship, true, 0.08, 0.08)

    this.cameras.main.setZoom(4)

  }

  update(){ 

    this.ship.setVelocity(0)

    if (this.cursor.left?.isDown){
      this.ship.setAngle(-90).setVelocityX(-200)
    }

    if (this.cursor.right?.isDown){
      this.ship.setAngle(90).setVelocityX(200)
    }

    if (this.cursor.up?.isDown){
      this.ship.setAngle(0).setVelocityY(-200)
    }

    if (this.cursor.down?.isDown){
      this.ship.setAngle(-180).setVelocityX(200)
    }

  }
    
}

```

You can find the full project at:

> **[camera+follow.zip](https://drive.google.com/file/d/1cw70hQqTQ5MZzntCTy38ymKU7J20CxC_/view?usp=sharing)**
>
> Google Drive file.

---

<div class="post-metadata">

### Author: ![scottwestover](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/scottwestover/32/7442_2.png) [@scottwestover](https://phaser.discourse.group/u/scottwestover)
#### Post date: [September 6, 2024, 2:36pm UTC](https://phaser.discourse.group/t/player-wont-move-down/14709/2 "2024-09-06T14:36:54Z")

</div>

> [@vivekchakraverty](#):
>
> ```javascript
> if (this.cursor.down?.isDown){
> this.ship.setAngle(-180).setVelocityX(200)
> }
> 
> ```

In the code above, you will want to switch `setVelocityX` to `setVelocityY`.

---

<div class="post-metadata">

### Author: ![vivekchakraverty](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/vivekchakraverty/32/8495_2.png) [@vivekchakraverty](https://phaser.discourse.group/u/vivekchakraverty)
#### Post date: [September 6, 2024, 2:39pm UTC](https://phaser.discourse.group/t/player-wont-move-down/14709/3 "2024-09-06T14:39:55Z")

</div>

sorry, it was such a foolish oversight!
