# How do I make a group collide with world bounds?

**URL:** <https://phaser.discourse.group/t/how-do-i-make-a-group-collide-with-world-bounds/2448>\
**Category:** Phaser 3\
**Created:** [May 14, 2019, 1:02am UTC](https://phaser.discourse.group/t/how-do-i-make-a-group-collide-with-world-bounds/2448 "2019-05-14T01:02:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ducanishah](https://avatars.discourse-cdn.com/v4/letter/d/6a8cbe/32.png) [@ducanishah](https://phaser.discourse.group/u/ducanishah)\
**Post date:** [May 14, 2019, 1:02am UTC](https://phaser.discourse.group/t/how-do-i-make-a-group-collide-with-world-bounds/2448/1 "2019-05-14T01:02:18Z")

</div>

I am trying to create a group of objects under the arcade physics system that will collide and “bounce” off of world bounds. I understand that for a single object, doing `myObject.setCollideWorldBounds(true)` does the trick, but I am unsure how to create a collider with world bounds that could be applied to a group.  
Thank you for any help.  
-Duncan

---

<div class="post-metadata">

**Author:** ![sachinkiranti](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/sachinkiranti/32/1382_2.png) [@sachinkiranti](https://phaser.discourse.group/u/sachinkiranti)\
**Post date:** [May 14, 2019, 9:11am UTC](https://phaser.discourse.group/t/how-do-i-make-a-group-collide-with-world-bounds/2448/2 "2019-05-14T09:11:50Z")

</div>

Maybe this is what you are looking for

> **[SOLVED issue with world bounds collision](http://www.html5gamedevs.com/topic/38972-solved-issue-with-world-bounds-collision/)**
>
> Hi everyone, Im trying to implement world bounds and cant get it to work. Heres how Im doing it: this.physics.world.setBounds(0, 0, this.layer1.width, this.layer1.height, true, true, true, true); this.player = new Player(this, objLayer\[0\].x,...

---

<div class="post-metadata">

**Author:** ![ducanishah](https://avatars.discourse-cdn.com/v4/letter/d/6a8cbe/32.png) [@ducanishah](https://phaser.discourse.group/u/ducanishah)\
**Post date:** [May 14, 2019, 11:42pm UTC](https://phaser.discourse.group/t/how-do-i-make-a-group-collide-with-world-bounds/2448/3 "2019-05-14T23:42:43Z")

</div>

No, thank you. I am looking for a way to set up a collider using physics.add.collider (or some other method with the same effect) that will apply to the whole group, instead of having to configure each group member individually.

---

<div class="post-metadata">

**Author:** ![samme](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/samme/32/5275_2.png) [@samme](https://phaser.discourse.group/u/samme)\
**Post date:** [February 5, 2023, 7:15pm UTC](https://phaser.discourse.group/t/how-do-i-make-a-group-collide-with-world-bounds/2448/4 "2023-02-05T19:15:10Z")

</div>

To set `collideWorldBounds` on each body in a group (when created or added to the group), it’s

```
this.physics.add.group({ collideWorldBounds: true });

```

If you want each sprite to bounce when any one hits the world bounds, probably use [world bounds event](https://labs.phaser.io/edit.html?src=src%5C3.60%5Cphysics%5Carcade%5Cgroup%20world%20bounds%20event.js).
