third-person-camera
Sample code of the talk "Six Ingredients for a Dynamic Third-Person Camera" at Unreal Fest Europe 2018.
Setup
- Create a HoatPlayerCameraManager blueprint and reference it in your PlayerController blueprint.
- Ensure you're using the HoatCameraSpringArmComponent at your Character.
- Implement ICameraActorInterface and IPlayerCharacterInterface for your Character.
Usage
Camera Modification Volumes
- Create a HoatCameraModifierApplyVolumeModifications blueprint and add it to your camera manager.
- Add HoatCameraModificationVolumes to your levels as desired.
Pitch-To-Distance Curves
- Create a curve asset.
- Create a HoatCameraModifierApplyPitchCurves blueprint and add it to your camera manager.
Focusing Walk Directions
- Create a HoatCameraModifierFocusWalkDirection blueprint and add it to your camera manager.
Keeping Line of Sight Preemptively
- Add a new collision trace channel (e.g. CameraRotateAround).
- Create a HoatCameraModifierKeepLineOfSightPreemptive blueprint, use your new trace channel, and add the modifier to your camera manager.
- Block the new trace channel for all objects in your level the camera should rotate around. Make sure to ignore the default Camera trace channel to prevent the spring arm from kicking in.
License
third-person-camera is dual-licensed:
- everything in Content/Geometry is governed by the Unreal® Engine End User License Agreement
- everything in Content/Mannequin is governed by the Unreal® Engine End User License Agreement
- everything in Content/ThirdPerson is governed by the Unreal® Engine End User License Agreement
Everything else is released under the MIT License.