Download

OnRestart OR something similar

Hi,
I have a camera actor class that I want it to Set View Target everytime the game/level starts. I have added the actor in the character class as a child class. In the camera class On Begin Play I set the camera as player controller’s View Target. However, this works just fine the first time we play. When player dies the original camera (FPS) reset. I would like the camera (my custom camera) to Set View Target every time the game/level starts/restarts. Any suggestions?

Many thanks

What actions do you perform on player death?

I would make a function in my PlayerController called SetCamera. In the character, I would cast to my player controller and call SetCamera on the BeginPlay Action. This should be called every time the player is spawned in a level. Also, if I needed to set it for some other reason, I could call it from anywhere at anytime since it is in my player controller.

Thank you guys,
I will try that. The main problem in all this hustle is the fact that the template, ShooterGame, is written in C++. As a non-code person I have problems tracking where things go. I will start a post soon about all my issues and how I solved them.