Hi, quite new in UE4, coming from an Unity background, I’m struggling to wrap my head around an architecture for a camera spot system.
To explain it a bit, the concept is to have areas in the game on which, where the character enter, it switch the camera to that spot which has it own properties. For example, in this spot, the zoom is using a spline defined by a designer in the viewport, or a spring arm with arm length , etc…
The character itself will also have a camera spot attached to him where the camera will be by default when he’s not in special areas
So, I’ll stick with the zoom example which will be a base for various other properties…
I’m trying to understand how to setup everything on c++ side to have something as simple as that : The designer in the editor detail choose an enum value for zoom like that which will be a property in the CameraSpotActor :
UENUM()
enum class EZoomCameraMode : int8
{
Spline,
ArmLength,
None
};
Each of this enum will have a c++ class defined which derived from ZoomMode as :
- IZoomMode inherit ASceneComponent
- SplineZoomMode inherit IZoomMode - Has a property USplineComponent
- ArmLengthZoomMode inehrit IZoomMode - Has a property USpringArmComponent
So I would like, when the designer select the enum ZoomMode, that It spawn this specific ZoomComponent based on it, where It spawn subcomponent coming from them but I’m don’t really know how to achieve this, do I need to use the PostEditChangeProperty or generally speaking, It is the good approch to this problem in UE ?
Thanks