changing box trigger size after starting the game

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?

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

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 ?

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

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?

Runtime or in the editor?

during runtime

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

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:

Widget: text box + slider:

Function:

In case Slider changes, change the box size:

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

Result:

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

Create a function, with one vector input:

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

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