# changing box trigger size after starting the game

**URL:** <https://forums.unrealengine.com/t/changing-box-trigger-size-after-starting-the-game/468483>\
**Category:** Community & Industry Discussion\
**Tags:** size, slider, box-trigger, change, unreal-engine, Levels, question\
**Created:** [July 21, 2020, 7:16pm UTC](https://forums.unrealengine.com/t/changing-box-trigger-size-after-starting-the-game/468483 "2020-07-21T19:16:01Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![donkeykongy323](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@donkeykongy323](https://forums.unrealengine.com/u/donkeykongy323)\
**Post date:** [July 21, 2020, 7:16pm UTC](https://forums.unrealengine.com/t/changing-box-trigger-size-after-starting-the-game/468483/1 "2020-07-21T19:16:01Z")

</div>

Is there a way to change the box trigger size within levels after starting the game up? Or can object/actor sizes not really be changed once you compile and start everything up?

---

<div class="post-metadata">

**Author:** ![EvilCleric](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@EvilCleric](https://forums.unrealengine.com/u/EvilCleric)\
**Post date:** [July 21, 2020, 7:31pm UTC](https://forums.unrealengine.com/t/changing-box-trigger-size-after-starting-the-game/468483/2 "2020-07-21T19:31:54Z")

</div>

Changing the size of a trigger box, in this case, double its size everytime you press B:

 ![307747-1.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/0/e/a0eadfa23fa70568458e612afcab36ab37961f41.jpeg)

---

<div class="post-metadata">

**Author:** ![donkeykongy323](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@donkeykongy323](https://forums.unrealengine.com/u/donkeykongy323)\
**Post date:** [July 21, 2020, 7:35pm UTC](https://forums.unrealengine.com/t/changing-box-trigger-size-after-starting-the-game/468483/3 "2020-07-21T19:35:52Z")

</div>

what if i have multiple box triggers and I want to adjust the size for each of them individually instead of having all the triggers change together and become same size when I press B in this case ?

---

<div class="post-metadata">

**Author:** ![EvilCleric](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@EvilCleric](https://forums.unrealengine.com/u/EvilCleric)\
**Post date:** [July 21, 2020, 7:45pm UTC](https://forums.unrealengine.com/t/changing-box-trigger-size-after-starting-the-game/468483/4 "2020-07-21T19:45:51Z")

</div>

Just select the one you want and use its reference instead of “Box”.

---

<div class="post-metadata">

**Author:** ![donkeykongy323](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@donkeykongy323](https://forums.unrealengine.com/u/donkeykongy323)\
**Post date:** [July 21, 2020, 7:48pm UTC](https://forums.unrealengine.com/t/changing-box-trigger-size-after-starting-the-game/468483/5 "2020-07-21T19:48:18Z")

</div>

what if i have like multiple doors all of the same type and have a trigger around it in the viewport and want to adjust each trigger separately then? Is there a way to do that or would i just have to make child classes for each door?

---

<div class="post-metadata">

**Author:** ![EvilCleric](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@EvilCleric](https://forums.unrealengine.com/u/EvilCleric)\
**Post date:** [July 21, 2020, 7:49pm UTC](https://forums.unrealengine.com/t/changing-box-trigger-size-after-starting-the-game/468483/6 "2020-07-21T19:49:31Z")

</div>

Runtime or in the editor?

---

<div class="post-metadata">

**Author:** ![donkeykongy323](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@donkeykongy323](https://forums.unrealengine.com/u/donkeykongy323)\
**Post date:** [July 21, 2020, 7:53pm UTC](https://forums.unrealengine.com/t/changing-box-trigger-size-after-starting-the-game/468483/7 "2020-07-21T19:53:07Z")

</div>

during runtime

---

<div class="post-metadata">

**Author:** ![EvilCleric](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@EvilCleric](https://forums.unrealengine.com/u/EvilCleric)\
**Post date:** [July 21, 2020, 8:05pm UTC](https://forums.unrealengine.com/t/changing-box-trigger-size-after-starting-the-game/468483/8 "2020-07-21T20:05:26Z")

</div>

Still, you haven’t said how you pretend to select the door? Linetrace, overlap event, the closest one, …  
But the principle here presented is the same regardless of the selection method.

Here is an example, where the box collider will change its size when the player overlaps with it.

You have a BP of a door:

![307750-1.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/a/1/fa130ba0d4fd27343b998ce5f69e5ad7815b936f.jpeg)

Create a function, with one vector input:

 ![307761-2.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/1/c/81c65301af90464bb19f32c72df5dd9dd241d095.jpeg)

In the player BP, everytime the player overlaps a door’s collider, call the function, and double the box collider size in all axis:

 ![307752-5.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/5/f/15fec280ecc2779178a1bc8a98a0e161dc299c62.jpeg)

---

<div class="post-metadata">

**Author:** ![EvilCleric](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@EvilCleric](https://forums.unrealengine.com/u/EvilCleric)\
**Post date:** [July 21, 2020, 8:40pm UTC](https://forums.unrealengine.com/t/changing-box-trigger-size-after-starting-the-game/468483/9 "2020-07-21T20:40:22Z")

</div>

If for example, instead of the overlap, you want to use the mouse for the door selection, then in the player BP:

 ![307754-1.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/b/6/3b671a86d7affdf97d6a73761472080fabf69077.jpeg)

---

<div class="post-metadata">

**Author:** ![donkeykongy323](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@donkeykongy323](https://forums.unrealengine.com/u/donkeykongy323)\
**Post date:** [July 21, 2020, 9:01pm UTC](https://forums.unrealengine.com/t/changing-box-trigger-size-after-starting-the-game/468483/10 "2020-07-21T21:01:51Z")

</div>

oh thanks!! what if i wanted a slider UI within the level that i could slide to adjust the triggers. is that also possible?

---

<div class="post-metadata">

**Author:** ![EvilCleric](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@EvilCleric](https://forums.unrealengine.com/u/EvilCleric)\
**Post date:** [July 21, 2020, 9:44pm UTC](https://forums.unrealengine.com/t/changing-box-trigger-size-after-starting-the-game/468483/11 "2020-07-21T21:44:15Z")

</div>

I’m going to give a simple example, and from there adapt.

Goal: use mouse to select door, show door name and slider to adjust its box collider. The adjustment will be in relation to its original extends size (32,32,32)

**Door** :

 ![307763-4.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/a/a/baa56c627562dac97d0d46a93923694ee93f471e.jpeg)

**Widget** : text box + slider:

 ![307764-1.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/f/8/1f8c4adf8a5c639245375e319ad4357c90d67ae5.jpeg)

Function:

 ![307765-2.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/b/5/4b5a7ea98347787ae6835fed21f3e6f667ac7217.jpeg)

In case Slider changes, change the box size:

 ![307766-3.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/0/2/d029c0d1b425e76beb4a3ed4c593ffab614d3520.jpeg)

---

<div class="post-metadata">

**Author:** ![EvilCleric](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@EvilCleric](https://forums.unrealengine.com/u/EvilCleric)\
**Post date:** [July 21, 2020, 9:44pm UTC](https://forums.unrealengine.com/t/changing-box-trigger-size-after-starting-the-game/468483/12 "2020-07-21T21:44:44Z")

</div>

In **player** , show mouse, add widget, and door selection system:

 ![307767-5.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/6/5/e65ea2281bee03f79da8d78a7ce1996b490c3610.jpeg)

Result:

 ![307768-6.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/b/f/1bf90f82a72dfbe48fd9c97cf34e237656ff96a1.jpeg)
