Creating a 3D Animated Character

An Animated Character is a 3D model with a skeleton that can perform movements such as run, walk and jump. To create an Animated Character, you need to have multiple FBX files that contain a model, skeleton, and animation. If you want to apply multiple animations to a single character, each FBX file must have the same model and skeleton.

To make an animated character react and move to the the players movement controls, you need to have FBX files that contain an idle, walk, run, and jump animation.

Set Up Your Character

The following walks you through how to setup a 3D animated character with multiple animations and allow the player to control it in the game.

If you do not have any FBX files, feel free to download the Erik Animation Pack.
1. Import FBX Files

To import the animation FBX files:

  1. Drag all the FBX files you want to use from your computer into the scene and on the dropdown wheel, drop them on Character.
    When you import multiple FBX files, the FBX Import Options window appears where you can add all your animations to a single asset.
  2. In the FBX Import Options window, make sure that the Modify Selected and Add Animation options are selected, then click Import.
2. Set Up Animations

To set up the animations of the character:

  1. In the World workspace and in the Asset panel on the left, click the name of the character asset.
  2. In the Options panel on the right and on the bottom, click Add Brainbox.
  3. At the top, select Animated Platformer. Multiple attributes appear in the options panel.
  4. In the Scene attribute field, click the Edit button .
  5. In the Sub Scene Manager window and on the right, select the name of your idle animation or skeleton and click Save.
  6. In the Options panel and in each of the Animations attributes, click the dropdown and select the respective animation names.
    The example below displays the attributes with the appropriate Erik Animations.
  7. In the Asset panel, double-click the character to open its Node Map.
  8. If there are any Sub Scene and Keyframe Animation nodes outside the Animated Platformer.
  9. Select any Sub Scene and Keyframe Animation nodes that are not in the Animated Platformer group and press DELETE.
    In the example below you would delete both the Sub Scene and Keyframe Animation nodes labeled as Erik@idle.

    If you do not delete the Sub Scene outside the Brainbox group, you will see two models attached to the character when you preview your game.
  10. On the Navigation bar at the top, click the name of your 3D World to go back to the Scene Editor.

Add Movement Controls

After your character and animations are set up, add any of the following movement controls.
Keyboard Controls

To add keyboard controls:

  1. In the World workspace and in the Asset panel, click the name of the character asset.
  2. In the Options panel, click Add Brainbox and click Keyboard Controls.
  3. To change the Jump Key and the Run Key, click the field and type the desired key.
  4. Preview your game and use the following keys to move your asset.
    • To move the character, use the W, A, S, D or arrow keys.
    • To make the character run, use the same movement keys while holding the Run Key.
    • To make the character jump, press the Jump Key.
  5. In the Options panel and in the Movement Parameters section, adjust the attributes as desired. For more details, see Animated Platformer.
Mobile Controls

To add a mobile joystick control:

  1. On the Mind Map, drag a UI Node to the grid and connect the Load input to the UI output of a 3D World.
  2. Double-click the UI Node to open the UI editor.
  3. In the Asset Panel, click Asset Library and double-click the Joystick to add it to the Asset panel.
  4. Click Asset Library to go back to the UI Editor.
  5. From the Asset Panel, drag the Joystick to the grid and resize and position it as desired.
  6. In the Options panel, scroll to the bottom and in the EventName field, delete the default text and type Joystick.
  7. On the Navigation bar at the top, click 3D World or click the Mind Map icon and on the Mind Map, double-click the 3D World node.
  8. In the Asset panel, click the character asset.
  9. In the Options Panel, click Add Brainbox and select Mobile Controls. Its attributes now appear in the Options panel.
  10. In the Event Group delete the default text.
  11. In the Event Name delete the default text and type Joystick.
  12. Preview your game and use your mouse to drag the Joystick in any direction.
Keyboard Camera Controls

To add keyboard controls that rotate the camera around the character:

  1. In a 3D World workspace and in the asset panel, select your character.
  2. In the Options panel, click Add Brainbox and select Keyboard Camera Controls.
  3. To change the speed of the camera rotation, enter a numeric value in the Rotation Amount field.
  4. To change the keys, click the Left Turn Key or Right Turn Key field and type the desired key.