# Room walls colliders don't work

**URL:** <https://forums.unrealengine.com/t/room-walls-colliders-dont-work/818600>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, question\
**Created:** [March 24, 2023, 9:30pm UTC](https://forums.unrealengine.com/t/room-walls-colliders-dont-work/818600 "2023-03-24T21:30:51Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![FabianaCarboni](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FabianaCarboni](https://forums.unrealengine.com/u/FabianaCarboni)\
**Post date:** [March 24, 2023, 9:30pm UTC](https://forums.unrealengine.com/t/room-walls-colliders-dont-work/818600/1 "2023-03-24T21:30:52Z")

</div>

Hello everyone! I’m testing an application on an ipad and although I put the walls of the room a collider set to “blockall”, when I try to do swipe and pinch to zoom movements, I still go off the walls and the floor.  
In viewport if I enable player collision, I see them, but in the end in app they don’t work.  
Can anyone help me?

---

<div class="post-metadata">

**Author:** ![SupportiveEntity](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SupportiveEntity](https://forums.unrealengine.com/u/SupportiveEntity)\
**Post date:** [March 25, 2023, 3:28am UTC](https://forums.unrealengine.com/t/room-walls-colliders-dont-work/818600/2 "2023-03-25T03:28:26Z")

</div>

Hey there @FabianaCarboni! So depending on how your character is setup, there can be a number of reasons collisions aren’t working. May we see your character blueprint and your movement logic?

If your character is a character class and using a capsule, verify that it’s set to block all as well. The character class movement component should block collision with anything that has simple collisions and can collide with the player.

Do your walls have collision meshes?

---

<div class="post-metadata">

**Author:** ![FabianaCarboni](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FabianaCarboni](https://forums.unrealengine.com/u/FabianaCarboni)\
**Post date:** [March 25, 2023, 2:30pm UTC](https://forums.unrealengine.com/t/room-walls-colliders-dont-work/818600/3 "2023-03-25T14:30:26Z")

</div>

The project is a charcaterless but first-person touch application, where through swipe motions, one can move within a room.

The walls have collisions in fact if I activate the “player collision” mode in viewport, they color. However, at the time of testing on ipad, if one swipes one can move through walls, floor and even ceiling.

---

<div class="post-metadata">

**Author:** ![SupportiveEntity](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SupportiveEntity](https://forums.unrealengine.com/u/SupportiveEntity)\
**Post date:** [March 25, 2023, 8:07pm UTC](https://forums.unrealengine.com/t/room-walls-colliders-dont-work/818600/4 "2023-03-25T20:07:59Z")

</div>

Ahhh there you go, the reason I asked to see your movement setup is because different nodes have different fixes here. I’m going to assume you’re using Add/Set actor location then. If so that node ignores collision when making moves unless you tick the Sweep boolean in it. Though without seeing your nodes you could be moving it a number of ways, though that is the most common.

---

<div class="post-metadata">

**Author:** ![FabianaCarboni](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FabianaCarboni](https://forums.unrealengine.com/u/FabianaCarboni)\
**Post date:** [March 28, 2023, 4:46pm UTC](https://forums.unrealengine.com/t/room-walls-colliders-dont-work/818600/5 "2023-03-28T16:46:39Z")

</div>

Sorry I didn’t get the notification of the response. These are the bp settings of swiping touch.

 ![Immagine 2023-03-28 184505](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/0/5/f05a3e2c949134a24f0106f5ea226ce3583293e5.jpeg)  
 ![Immagine 2023-03-28 184523](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/0/4/d0444d796791836e5f555361e3ba03248c13192b.jpeg)  
 ![Immagine 2023-03-28 184537](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/3/5/c359f4686f95637f0a4e3463eb0aa347d8c3af04.jpeg)

---

<div class="post-metadata">

**Author:** ![SupportiveEntity](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SupportiveEntity](https://forums.unrealengine.com/u/SupportiveEntity)\
**Post date:** [March 29, 2023, 4:11am UTC](https://forums.unrealengine.com/t/room-walls-colliders-dont-work/818600/6 "2023-03-29T04:11:02Z")

</div>

See the sweep Boolean on the Add Local Offset nodes? Check those on. Sweep checks to see if it will make collision with the movement and then will stop the movement. Most movement nodes come with a sweep bool or it built in.

---

<div class="post-metadata">

**Author:** ![FabianaCarboni](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FabianaCarboni](https://forums.unrealengine.com/u/FabianaCarboni)\
**Post date:** [March 29, 2023, 8:25am UTC](https://forums.unrealengine.com/t/room-walls-colliders-dont-work/818600/7 "2023-03-29T08:25:28Z")

</div>

I set on the node sweep “add local offset” but the colliders still do not work. 😅

---

<div class="post-metadata">

**Author:** ![SupportiveEntity](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SupportiveEntity](https://forums.unrealengine.com/u/SupportiveEntity)\
**Post date:** [March 29, 2023, 8:33am UTC](https://forums.unrealengine.com/t/room-walls-colliders-dont-work/818600/8 "2023-03-29T08:33:53Z")

</div>

That’s odd, mimicking your setup with proper collisions I don’t get the same effect. Are collisions for your collider and the walls set to block all (or at least each other)? Are you using a static mesh or an overlap box on your object?

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/2/4/f24e7903da9acc19904a97d8cb89969d9f90aeb0.png)

---

<div class="post-metadata">

**Author:** ![FabianaCarboni](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FabianaCarboni](https://forums.unrealengine.com/u/FabianaCarboni)\
**Post date:** [March 29, 2023, 8:50am UTC](https://forums.unrealengine.com/t/room-walls-colliders-dont-work/818600/9 "2023-03-29T08:50:01Z")

</div>

I’m using a static mesh and this are the settings for the collision.

![Immagine 2023-03-29 104913](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/c/7/7c76b322c0c3834c2af3281098fc8a228290fe47.jpeg)

I tried setting the collision to custom so as to unlock “collision enabled (query and physics)” but nothing.

---

<div class="post-metadata">

**Author:** ![SupportiveEntity](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SupportiveEntity](https://forums.unrealengine.com/u/SupportiveEntity)\
**Post date:** [March 30, 2023, 3:49am UTC](https://forums.unrealengine.com/t/room-walls-colliders-dont-work/818600/10 "2023-03-30T03:49:20Z")

</div>

Interesting! In that PlayerCamera reference is your collision the root component of the object? My test object is just an SM with blockall and moving with add local offset with sweep as well.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/0/1/7013d630f00d5ea87aca3094a2e8fab15fc913ef.jpeg)

---

<div class="post-metadata">

**Author:** ![FabianaCarboni](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FabianaCarboni](https://forums.unrealengine.com/u/FabianaCarboni)\
**Post date:** [March 30, 2023, 7:55am UTC](https://forums.unrealengine.com/t/room-walls-colliders-dont-work/818600/11 "2023-03-30T07:55:31Z")

</div>

This is how the reference is set now.

 ![Immagine 2023-03-30 095355](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/6/c/66c212b8afba6921c2fb71cd7b975d9fd0564f6a.jpeg)

Should I add the walls and the floor inside? Sorry but unfortunately I’m still new to unreal and have a lot to learn.

---

<div class="post-metadata">

**Author:** ![SupportiveEntity](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SupportiveEntity](https://forums.unrealengine.com/u/SupportiveEntity)\
**Post date:** [March 30, 2023, 8:18am UTC](https://forums.unrealengine.com/t/room-walls-colliders-dont-work/818600/12 "2023-03-30T08:18:37Z")

</div>

Ahhh there we go, That’s the issue. The pawn that holds your camera would need a static mesh/collider as it’s root to be able to take collisions. The walls and floors don’t need to be in the same BP at all, just need something to determine the actual collisions. Right now your camera has no components that can collide (minus the spring arm but that’s only for traces).

So just for now just to visualize the collisions, add a cube static mesh, then drag it to the location where you want the collisions to occur from. If your game is set up how I assume, it’d likely be in front of the camera. Then in the component hierarchy, click and drag the cube to the default scene root, change your local offset to the cube, Save, then test it out. It’s likely blocking your camera view right now but we will disable it’s visuals in a moment, this is just for you to visualize where the collisions are.

After that, set the cube to no visibility:  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/b/4/0b4535fdc0c35d5e2eedfba39730045a1a403ee5.png)

Technically you could just use box collisions, but the SM is good for showing the collider well while you’re getting it to work well.

---

<div class="post-metadata">

**Author:** ![FabianaCarboni](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FabianaCarboni](https://forums.unrealengine.com/u/FabianaCarboni)\
**Post date:** [March 30, 2023, 1:03pm UTC](https://forums.unrealengine.com/t/room-walls-colliders-dont-work/818600/13 "2023-03-30T13:03:37Z")

</div>

Unfortunately, I tried to insert a cube with these collisions, but nothing.

 ![Immagine 2023-03-30 150321](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/1/1/f1127b5d27419eed7fa233db870b52633c7b2010.jpeg)

When I test on the ipad the collisions don’t work unfortunately.

---

<div class="post-metadata">

**Author:** ![SupportiveEntity](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SupportiveEntity](https://forums.unrealengine.com/u/SupportiveEntity)\
**Post date:** [March 31, 2023, 8:41am UTC](https://forums.unrealengine.com/t/room-walls-colliders-dont-work/818600/14 "2023-03-31T08:41:14Z")

</div>

Your cube is not your root in this case, it’s got to go here:  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/9/a/39aa5bc371dc8ad6777c821b272d7c00c6fb25a6.png)

---

<div class="post-metadata">

**Author:** ![FabianaCarboni](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FabianaCarboni](https://forums.unrealengine.com/u/FabianaCarboni)\
**Post date:** [March 31, 2023, 5:25pm UTC](https://forums.unrealengine.com/t/room-walls-colliders-dont-work/818600/15 "2023-03-31T17:25:15Z")

</div>

I put the cube in the root but unfortunately the colliders still don’t work when I test in app.

![Immagine 2023-03-31 225546](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/9/9/b9913c8d7f483e3ab83a1d4b2f089c1109a1ae61.jpeg)

---

<div class="post-metadata">

**Author:** ![SupportiveEntity](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SupportiveEntity](https://forums.unrealengine.com/u/SupportiveEntity)\
**Post date:** [April 2, 2023, 2:04am UTC](https://forums.unrealengine.com/t/room-walls-colliders-dont-work/818600/16 "2023-04-02T02:04:09Z")

</div>

No worries, I’ll prepare you a little project this evening showing off how you can do this, and then I’ll explain why it functions the way it does.

---

<div class="post-metadata">

**Author:** ![FabianaCarboni](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FabianaCarboni](https://forums.unrealengine.com/u/FabianaCarboni)\
**Post date:** [April 2, 2023, 3:54pm UTC](https://forums.unrealengine.com/t/room-walls-colliders-dont-work/818600/17 "2023-04-02T15:54:20Z")

</div>

Thank you very much! You’re so kind 😄

---

<div class="post-metadata">

**Author:** ![FabianaCarboni](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FabianaCarboni](https://forums.unrealengine.com/u/FabianaCarboni)\
**Post date:** [April 6, 2023, 1:28pm UTC](https://forums.unrealengine.com/t/room-walls-colliders-dont-work/818600/18 "2023-04-06T13:28:08Z")

</div>

For anyone who might have my problem, I solved it by putting a collision box as root, then putting “trace complex collision” on true, deleted the start player and inserted the pawn into the scene by putting it in class player 0. For framing then I simply moved the camera inside the pawn to where I had the start player before.

I would still like to thank those who have given me assistance so far.
