JETPACK SYSTEM

Description

The ‘Jetpack’ system is a physics-based propulsion system implemented entirely within the blueprint component ‘BPC_Jetpack’, including the handling of player inputs. The flight controls and feeling of the system were directly inspired by the ‘Jetpack’ found in the game “Lethal Company”.

Maneuverability of the ‘Jetpack’ is intentionally complex, it is not designed to be simple, it is designed to be mastered.

Key Features

Flight

While airborne, holding the ‘Thrust’ button (Space Bar) activates the ‘SetThruster’ event, configuring the character, simulation, controls, and physics thruster for flight. Flight overrides normal movement controls (WASD), enabling the player to instead control the pitch, roll, and yaw of their collision capsule.

The physics thruster is located at the bottom of the character’s collision capsule, and fires for as long as the ‘Thrust’ button is held. Small adjustments can be made by tapping or briefly holding the ‘Thrust’ button as well.

While the ‘Thrust’ button is held down the player can additionally hold the ‘Boost’ button (Left Shift) to multiply their overall thrust power.

Landing

When the player’s velocity is below a set threshold, a sphere trace will begin firing below the the character’s collision capsule to check if they are against another object. If the player is considered “Landed” then the ‘OnLanded’ event will fire to disable physics simulation, reorient the character to a standing position, and remove the ‘Jetpack’ control input overrides.

Hovering

While the ‘Thrust button is held down the player can activate “Hovering” by pressing the ‘Hover’ button (X Key). While ‘Hover’ is active the ‘Thrust’ button will no longer need to be held and the player’s current altitude will be automatically maintained. The player can still tilt to move themselves in a direction, but their altitude will remain locked at the set height. However if the player tilts so far forwards that they would begin to tilt downwards, then “Hovering” will automatically deactivate.

Implementation

The ‘BPC_Jetpack’ system simply needs to be added to the desired character actor and all functionality will already be implemented.

Flight Arrows

At the bottom of the screen you will notice 3 arrows, each one relays essential flight information that is necessary for remaining coordinated during flight. The design itself is fairly basic, any game utilizing this system would benefit much more from a dedicated UI.

Red Arrow - Sky Pointer

This arrow always points in the direction of ‘World Up’. It helps keep the player oriented with which direction is up and down while maneuvering or potentially getting out of a spin.

Blue Arrow - Thruster Direction

This arrow points in the direction that the thruster is propelling. Since the player is able to freely look up and down during flight, this arrow is necessary to help them know the thruster direction relative to their current view.

Green Arrow - Velocity Direction

This arrow points in the direction of the player’s current velocity. It shows where the player is actually moving and helps them orient their ‘Thruster Direction’ arrow to counter their current velocity and slow down.