Skip to content

FlexiCam Blueprints Tutorial

Step-by-step example of how to create your own Character setup and Camera Mode


Prerequisites

  • A character Blueprint with basic movement (the Third Person Template character, etc.)

Third Person Camera Mode

This section shows how to set up basic Third Person Camera Mode

  1. Add SpringArmComponent to your Blueprint

    alt text

  2. Add FlexiCameraComponent

    alt text

  3. Make the FlexiCameraComponent a child of the SpringArmComponent

    alt text

  4. Add FlexiCameraModeManagerComponent to your Blueprint

    alt text

  5. Set Default Camera Mode Class in FlexiCameraModeManagerComponent to BP_ThirdPersonMode

    alt text

    Warning

    If you don’t perform this step, the View Transform will be zero.

    You now have a basic Third Person camera set up.


FlexiCam Interface

To work properly with other plugin systems, such as Camera Mode Trigger our character need to implement FlexiCam Interface

  1. Go to Class Settings menu on top of editor

    alt text

  2. Inside Details panel in Implemented Interfaces property click on add button and search for FlexiCamInterface

    alt text

  3. On the left side of the Editor find FlexiCamInterface and double-click on GetFlexiCameraModeManagerComponent function

    alt text

  4. Drag and drop Camera Manager Component from Components panel and place it to Return Value

    alt text


Creating custom Camera Mode

  1. Open Content Browser, press Right Mouse Button and select Blueprint Class menu

    alt text

  2. Press All CLASSES and search for FlexiCameraMode

    alt text

    Create Blueprint and name in CM_SideScroller. Open this Blueprint.

  3. In the Functions menu of your Blueprint select Override option and choose Update View function

    alt text

  4. Press Right Mouse Button inside of Event Graph and search for Get Pivot Location function !!! tip This function returns location of Actor that have FlexiCameraComponent and this mode applied.

  5. Add two variables to the Blueprint as shown in the image.

    alt text

    Drag and drop them into Event Graph (with Get option).

  6. Drag pin from Default Rotation variable and search for Rotate Vector function

    alt text

Connect Camera offset variable to it

![alt text](<resources/Rotate vector result.png>)
  1. Drag Return Value pin of Get Pivot Location function and search for "+" sign

    alt text

    Connect Rotate Vector result to add function

    alt text

  2. Now search for ModeView struct. Choose Set option

    alt text

    Drag out Mode View pin and select Make FlexiCameraModeView

    alt text

  3. Connect pins as shown in the image below

    alt text

  4. Select Camera offset variable and set default value to -500.0 | 0.0 | 0.0

    alt text

Now we have a fully functional Side Scroller mode. Let’s see how to activate it.


Camera Mode Trigger

  1. In Content Browser create FlexiCameraModeTrigger Blueprint

    alt text

    Call it CMT_SideScroller

  2. Inside this Blueprint set Camera Mode Class variable to our CM_SideScroller

    alt text

  3. Place the trigger in your level and scale it to the desired size

    alt text

Now when Character inside of CMT_SideScroller our new CameraMode is active.

Tip

You can change camera angle by change Default Rotation inside CM_SideScroller Blueprint


Blend Camera Modes

Let’s make the blending between our two CameraModes smoother.

  1. Open CM_SideScroller Blueprint
  2. Open Class Defaults menu
  3. Set blending properties as shown below

    alt text

See the difference.

Congratulations! Now you know how to set up your own Camera Modes.

Tip

To see how to change input by camera mode see BP_FlexiCamCharacter