Rail Camera
Last updated
Last updated
Rail can be a very powerful tool if you want to precisely control camera position in a level at runtime. You can use a RailCamera to do this. If you also want to orient the camera to a specific target actor, you can use TargetingAim for the aim component.
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 RailFollow for "Follow Component", and TargetingAim for "Aim Component" if you would like to lock camera orientation to a particular target actor.
In RailFollow, you must specify a Camera Rig Rail actor in the level to property "Rail", then setting other properties according to your needs. Note that there are three follow types in RailFollow: Follow Target, Fixed Speed and Manual. Refer to Rail Follow for more information about these three types.
In the blueprint where you want to call this camera, invoke the "CallCamera" node and pass in the "Camera Class", "Follow Target" and "Aim Target". If you are not using the Follow Target in property Follow Type, you do not have to pass in an actor to "Follow Target". You can also specify "Blend Time", "Blend Func" and "Blend Exp" if you want smooth blending in.