I have directions stored in the command_array and simply want the sprite (this.player) to move to the right.
I am using the function moveToXY() like this:
for (var i = 0; i < this.command_array.length; i++) {
if (this.command_array[i].key === 'walk_right_com') {
this.game.physics.arcade.moveToXY(
this.player, //sprite reference
this.player.body.x + 150, // target x position