I wanted to make a moving platform that my character to stand on however I don’t know is it because of how I wrote my code but it doesn’t seem to be working. I want the platform to not be affected by gravity but to also be movable
platforms = this.physics.add.sprite(370, 430, ‘platform’).setIgnoreGravity(true);
whenever I execute this code the whole game crashes
I’ve also tried
this.physics.add.sprite(370, 430, ‘platform’).body.allowGravity = false;
which simply just makes my character phase through the platform