Possible Bug in moving an image
Rogue-dev opened this issue · comments
- A bug in the API:
- Phaser version(s): 3.24.1
- Live example: https://mousy-spiced-warrior.glitch.me/
- What steps produce the bug: I load an image in "preload", declare the "cursors" variable (cursors=this.input.keyboard.createCursorKeys();) in "create", then move the image if a key is pressed in "update".
- What should happen: The image should be able to move forever.
- What happens instead: If you move in the left and down direction for any amount of time, an error comes into the console.
- If there's an error:
- What's the error message?: Uncaught TypeError: Cannot create property 'x' on number 'NaN'
- What's the error trace (expand the error message)?:
Uncaught TypeError: Cannot create property 'x' on number 'NaN'
at Scene1.update (Scene1.js:125)
at initialize.step (phaser.min.js:1)
at initialize.update (phaser.min.js:1)
at initialize.step (phaser.min.js:1)
at initialize.step (phaser.min.js:1)
at e (phaser.min.js:1)
Although, I do admit it COULD be an error on my part, though I doubt it given that I have not found this error anywhere on the internet and it ONLY happens when you press the down and left arrows.
Wait, never mind, wrong repo. Sorry :/