xronn Posted December 1, 2015 Share Posted December 1, 2015 Hi, I'm trying to set all my physics setting for a group so when I draw each of my sprites I don't have to write the same code over and over again. npcGroup = game.add.group(); npcGroup.setAll('body.setSize', 19,26); npcGroup.setAll('body.immovable', true); npcGroup.setAll('body.moves', false); game.physics.enable(npcGroup, Phaser.Physics.ARCADE);Thats what I got but it doesn't appear to work, although I don't get any errors in the console either. Edit: I've updated these sections which now work - npcGroup.enableBody = true; npcGroup.physicsBodyType = Phaser.Physics.ARCADE; Link to comment Share on other sites More sharing options...
Recommended Posts