# How can I snap my box collisions to the edge of the screen?

**URL:** <https://forums.unrealengine.com/t/how-can-i-snap-my-box-collisions-to-the-edge-of-the-screen/2551408>\
**Category:** Blueprint\
**Tags:** actor, Mobile, unreal-engine, Blueprint, question\
**Created:** [June 11, 2025, 1:16pm UTC](https://forums.unrealengine.com/t/how-can-i-snap-my-box-collisions-to-the-edge-of-the-screen/2551408 "2025-06-11T13:16:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Earo60](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Earo60](https://forums.unrealengine.com/u/Earo60)\
**Post date:** [June 11, 2025, 1:16pm UTC](https://forums.unrealengine.com/t/how-can-i-snap-my-box-collisions-to-the-edge-of-the-screen/2551408/1 "2025-06-11T13:16:15Z")

</div>

To cut to the chase, I want to make my box collisions to snap to edge of the mobile screen (left, right & top) so when the ball goes on one of the edges it will bounce perfectly. Setting it manually isn’t good enough due to the different mobile screen sizes. On a smaller screen the manual method can either be good (works perfectly) or bad (bounces off screen). While on bigger screens the collisions will be visible.

There are 3 different wall Actors that consists of a Box collision (this will be used) and a cube (for reference it will get removed later)

Left Wall

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

Right Wall

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/0/7/f07600146941bba5b2cc609a4a69754f1c8a79cb.png)

Top Wall

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/e/4/be4b25541bb68e098cbb0fae01b98b64dd08bdcd.png)

Here is the result of the above blueprints.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/1/7/1170c2afced38f3e5c8c5f357a72e685cea8968a.jpeg)

Even though it seems to be working I’m still wondering if what I did is correct. Cause testing it i found out that the ball bounces off screen of the left wall while the right wall is slightly inwards.

So I’m asking is there a way to optimize this blueprint logic. I just started experimenting with deproject and still learning but I cant figure it out.
