I’m creating a fixed camera set-up like this: A BP that has a camera component inside which gets triggered via a trigger volume on being overlap. The Trigger Volume gets manually placed inside the level (I’m storing it via eye picker inside an exposed variable).
This works well enough, I run into the left trigger volume and it sets the left camera as the active view. I run back into the right trigger volume and the right camera becomes the active view. This works no matter how many times I copy and paste the camera BP.
Now here’s my problem, I want to center the camera on the player via the press of a button, this works perfectly well as long as I’m inside the trigger volume of the first placed camera BP (the right one), however if I’m inside the second one (the left one), then the button press is still triggering only the firstly placed camera (which I’m not seeing since the second camera is now my view target).
I’m getting the camera from inside the ThirdPersonCharacter BP via CastToFixedCamera Class > Get Actor Of Class > Camera Component.
Any ideas how I can differentiate between multiple placed BPs even though they’re all the same? If I access the camera component with Get All Actors Of Class > Get, like this:
Then I can directly influence via the integer slot which of the camera BPs is working with the button press, Integer [0] is the first copy and integer [1] is the second one. This means UE4 has an internal array of all the copies of the BPs inside the level, right?
What would be the best way to handle this situation?