Julia Posted November 3, 2014 Share Posted November 3, 2014 Hey. Me again. I'm trying to figure out why my randomly placed platforms for my platform game won't be immovable. I've included the physics and enableBody to the group.. this._platforms = game.add.group();this._platforms.enableBody = true;game.physics.enable(this._platforms, Phaser.Physics.ARCADE);this._platforms.body.immovable = true; The player lands on the platform and the platform goes down with the player, both top/bottom and left/right. I get this error: Uncaught TypeError: Cannot set property 'immovable' of undefined Thanks in advance! Link to comment Share on other sites More sharing options...
rich Posted November 3, 2014 Share Posted November 3, 2014 You're trying to set immovable on a Group. A Group doesn't have a body, only it's children have bodies. Tilde 1 Link to comment Share on other sites More sharing options...
Julia Posted November 4, 2014 Author Share Posted November 4, 2014 Thanks! It works now Link to comment Share on other sites More sharing options...
Hrupin Posted December 13, 2016 Share Posted December 13, 2016 Hi. And tell me how? And they can't understand. Thank you Link to comment Share on other sites More sharing options...
Recommended Posts