How can I achieve the same effect of BlueprintUpdateCamera In C++

In Blueprint i can use CameraManager’s BlueprintUpdateCamera to update the camera,but How can I achieve the same effect of BlueprintUpdateCamera In C++?The BlueprintUpdateCamera funtion of class APlayerCameraManager isn’t a virtual function :disappointed_relieved:

Blueprint hook to allow blueprints to override existing camera behavior or implement custom cameras. If this function returns true, we will use the given returned values and skip further calculations to determine final camera POV.


I found this comment in PlayerCameraManager.h above the function BlueprintUpdateCamera,
so what will happend if I dont override it in my blueprint?BlueprintUpdateCamera dont have a c++ definition.

A little late but since I’m going through this right now I thought I would go ahead a leave a comment in case someone else runs into this problem.

The function you want to override is:

virtual void UpdateViewTargetInternal(FTViewTarget& OutVT, float DeltaTime);

Description:
Does the actual work to UpdateViewTarget. This is called from UpdateViewTarget under normal circumstances (target is not a camera actor and no debug cameras are active) Provides a way for subclasses to override behavior without copy-pasting the special case code.
* @anonymous_user_64fde8e1 OutVT ViewTarget to use.
* @anonymous_user_64fde8e1 DeltaTime Delta Time since last camera update (in seconds).

2 Likes