Making an array referencing trigger boxes and cameras in the level, with blueprints

I am trying to set up a camera switch dependent on when the character hit a new trigger box (using this tutorial https://www.youtube.com/watch?v=i0O-ZgDfSvA) I got it working with one camera and now Im trying to figure out how to make it work for several bounding boxes and camera, I was thinking maybe a loop where it goes through each set, but I am not allowed to select the trigger boxes and cameras in my array for the level I keep getting this error

LogProperty: Warning: Illegal TEXT reference to a private object in external package (TriggerBox /Game/Programming/Lvl_Room_01.Lvl_Room_01:PersistentLevel.TriggerBox_UAID_047C16FF2DD76CA702_1608848862) from referencer (Lvl_Room_01_C /Game/Programming/Lvl_Room_01.Default__Lvl_Room_01_C). Import failed…

any help on this error or how to fix the camera switch problem would be appreciated

thank u for your time

1 Like

You can make one blueprint, which has a collision volume and a camera. It’s possible to move the camera after putting the BP in the level, just by double clicking on it.

When the player overlaps the volume, the blueprint makes itself the view target.

Then all you have to do, is put copies of this BP around the level :slight_smile:

Im very new with blueprints, how would u set that up, this is what I could do from the top of my head but I dont know how to reference the camera it wont let me

1 Like

Look for ‘reference to Self’ in the list. You can connect that to the ‘new view target’ pin :slight_smile:

Tell me if you get stuck, and I’ll make an example.

I’d create an Actor class that has a Scene, Collision and Camera Component.

Drop it in the level, move and scale the collision to trigger and move the camera where you want it.

On Begin Overlap switch cameras.
On End Overlap switch back to primary. Use an Interface event in the character class to handle switching back.

No need for Loops, get all actors etc. Encapsulated functionality.

This is what I mean

When you put it in the level, you can scale the box and move the camera just by getting at the components here

VT

2 Likes

Thank u, I think this will work great for our scenario, easy for the artist to be able to place cameras and triggerboxes!

1 Like

Great! :smiling_face_with_sunglasses:

This is the way

1 Like