Another Work Around For Get All Actors Of Class?
I do not understand how to solve this problem, yet I do understand it. The best way to explain it is that I set up a camera system where when the player goes up to an ammo box and presses "Q" the camera view will switch and transition to view the content inside the ammo box. I set this up with a get all actors of class node since that is the only way I know how to switch camera views within an actor (I do understand setting up cameras in level BPs. It is very much different than doing so inside an actor though)
Here is the part I don't understand how to work around. In the first screenshot I circled the number inside the array get a copy because that number refers to the placed ammo box on the level such as in the second screenshot I labeled the ammo boxes I placed in order. The camera will always activate ONLY on the first placed ammo box rather than the one I would walk up to. When ever I take the Ammo Box ordered as "0" the camera would then switch to Ammo Box "1" when I walk over to Ammo Box "2" to see its contents.
The Camera is completely dependent on the order I placed the ammo boxes. Is there a way I can work around this Get all actors of class node to switch camera? I cannot believe how difficult it is just to have a simple camera switch. Wish this could be easier.
you beat me too it but heres an answer anyways. you could have an event such as begin overlap, then take the other actor and cast to the players class to ensure its a player overlapping and not a random object. then you can get the controller and cast to player controller, we do this instead of getting player controller so that it is more adaptable and can be used with many players easily. then you use a set view target with blend and have the new target just be self. you can also repeat this process for end overlap and set the new target back to the player.
answered Apr 14 '19 at 09:56 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here