CameraActor - Get initial rotation in Level


I dropped a CameraActor inside my level. I want to use the CameraRotation that I define in it when my PC is “seeing throught it”.

The GetDefaultObject returns a GetActorRotation with zero value. It seems that that I’m getting the DefaultClass rotation and not the “instanced initial rotation in the level”.

any idea?


I’m not entirely certain I understand the problem.

If it’s a CameraActor you’ve placed and that isn’t moved by anything its rotation should be whatever it is set to in the editor. In order to get this instance rotation you’ll have to call GetActorRotation on that specific instance though not the CDO you’ll get from GetDefaultObject. How you get this CameraActor instance is up to you. For example you could use a TActorIterator or just a simple UPROPERTY where you can assign that CameraActor.

In fact my camera is “controlled” by the player when he is dead. So after the first time, the “initial” rotation is not the one that I’m expected.

So is there a way to retrieve or should I store it on the loading?