Demonstration

The project includes a working demonstration map called “DemoLevel”. These steps outline how it is set up so that you can make and experiment with your own.

Set the default Game Mode

This will set the Pawn to the custom Character, and set Controller to the custom PlayerController.

  • Edit > Project Settings…
  • Select Project > Maps & Modes
  • Under the “Default Modes” heading
    • Set “Default GameMode” to “BP_GameMode”

Make an empty Level

This will provide an open space for the Player and AI to spawn and move around.

  • File > New Level…
  • Choose “Basic”

Set the Ground for Overlap

In order to use the Jump input, the ground must be set to generate overlap events.

  • In the Level Viewport, select the “Floor” StaticMeshActor
  • Set Collision > Generate Overlap Events: True

Add a Navigation Mesh for the AI

This will provide the AIs information to navigate toward the Player.

  • Open the “Place Actors Panel”
  • Search for “Nav Mesh Bounds Volume”
  • Drag it into the Level Viewport
  • Press ‘P’ to visualize the NavMesh, or in the Viewport select Show > Navigation
  • Position and scale the NavMesh

Add an AI Spawner

This will provide a place for AIs to automatically spawn into the Level.

  • Open the “Place Actors Panel”
  • Search for “AIStart Pool”
  • Drag it into the Level
  • Position it near the Player Start

Test the Level

This will show the Ball Player Character. It is controlled with custom Movement, and custom Camera. The Camera will automatically turn to follow the Player, but can also be manually turned.

The AIs will spawn automatically and follow the Player using the NavMesh.

  • Press Play
  • Move the Ball: keyboard w/a/s/d, or the gamepad Left Stick
  • Jump the Ball: Space Bar, or mouse Right-Click, or the gamepad Left Bumper
  • Turn the Camera: cursor left/right, or Mouse, or the gamepad Right Stick

https://www.fab.com/listings/8442c959-9a18-4079-b87c-2626efb7725f