Voila this should do it
// add the spine object
const hero = this.add.spine(0, 0, 'dude', 'idle', true)
// add the body
this.physics.add.existing(hero)
// define the setFlipX function
hero.setFlipX = function(flip) {
if (flip) {
this.body.setOffset(hero.width, 0)
this.setScale(-1, 1)
} else {
this.body.setOffset(0, 0)
this.setScale(1, 1)
}
}
// flip the spine object and its body
hero.setFlipX(true)
// or
hero.setFlipX(false)