PiDEV Posted February 2, 2015 Share Posted February 2, 2015 Hi, I have code:function create(){ mapObjects = game.add.group(); mapObjects.enableBody = true; // Add some boxes var boxs = mapObjects.create(400, 400, 'crate'); boxs.body.immovable = true; boxs = mapObjects.create(700, 700, 'crate'); boxs.body.immovable = true;}function update(){game.physics.arcade.collide(you.sprite, mapObjects);}This works great. It's colliding images with my player. But how do I create a colored rectangle (not image) and collide it with player? Thanks Link to comment Share on other sites More sharing options...
Recommended Posts