setPushable is not a function

I can’t find the right way to use the setPushable function. It doesn’t seem to be available on the physics body or the parent sprite object.

this.body.setPushable(false);
TypeError: this.body.setPushable is not a function. (In ‘this.body.setPushable(false)’, ‘this.body.setPushable’ is undefined

1 Like

Make sure you’re using a newer Phaser. Only ArcadeImage and ArcadeSprite have the method. But all bodies have a pushable property.

Thanks for the reply. I’m using 3.55.1

Also, I tried this.body.pushable = false but it doesn’t seem to have any effect. Can it be set that way?

It can be set that way, yes.

Doesn’t work for me either, I’m also having the latest version.
Is there another way to simulate the same effect?

What doesn’t work?