Pseudo First Person Shooter Camera
Last updated
Last updated
First person shooter camera does not have to reside at character's eye or neck position. In fact, when you are arrow-shooting, you are also using a FPS-like camera, which we call Pseudo First Person Shooter Camera.
Right click on Content Browser -> "Blueprint Class" -> create a "ECameraBase" class.
Open the class blueprint, select the "Camera Settings Component" and on the "Details" panel, expand the "ECamera" section.
Choose ScreenFollow for "Follow Component", and ControlAim for "Aim Component".
In ScreenFollow, set Camera Distance to a relatively small value. In the official TPS template, 50 should work nicely. Then, set Follow Offset. In the template, a vector of (0, 20, 65) properly frames the target.
In ControlAim, set Vertical Range to limit the minimum and maximum pitch angles. Do not forget to enable Sync Yaw To Aim Target, which replicates camera rotation to the aim target, so that you can use it to rotate character in accordance with camera.
Go to your character's blueprint, disable Orient Rotation to Movement in the "Character Movement" component.
In the blueprint where you want to call this camera, invoke the "CallCamera" node and pass in the "Camera Class" and "Follow Target". You MUST specify the same actor to parameter Sync Yaw To Aim Target requires the aim target not to be null. You can also specify "Blend Time", "Blend Func" and "Blend Exp" if you want smooth blending in.