Escape Velocity

Made in Unreal Engine

Dynamic Gravity System

I created three types of Gravity Platforms, two of which are unused in the final game.

All share a base class GravitySource, which contains a UCurveFloat for dynamic gravity strengths.

Platform Types

GravitySource C++ code

Property used to store a UCurveFloat for curved gravity strength.

GravityPlayerController C++ code

GravityPlayerController - header


GravityPlayerController - UpdateGravityRotation


GravityPlayerController - Custom Input


GravityPlayerController - Get Rotations

Player-Gravity Blueprint Implementations

Collects overlapping gravity fields. Executed on BeginPlay.


Finds and assigns the nearest gravity source to be the primary source of gravity. Executed on Tick.


Returns the distance between an actor and a gravity source surface.


Returns the distance between an actor and the nearest vertex on a static mesh.


Lerps the gravity direction of the player towards the primary source of gravity and sets the current gravity strength. Executed on Tick.


Returns the gravity direction between an actor and a gravity source.


Returns the strength of gravity from the gravity source's UCurveFloat based on distance from the gravity surface.


Returns the distance of the area between the edge of the gravity field and the gravity surface.


Rotates the player towards the active gravity direction, if no gravity source is nearby, sets up in-space rotation. Executed on Tick.


Corrects player rotations when entering a space with no nearby gravity sources.


Applies gravity forces from applied gravity sources that are not the primary source of gravity. Executed on Tick.


Adds new overlapping gravity fields to an array of applied gravity sources. Executed on ActorBeginOverlap.


Removes gravity fields that are no longer overlapping with the player. Exectued on ActorEndOverlap.

Player Rotation and Locomotion

The player's upper body rotates to face the direction the camera is facing when on the surface of a planet.

The player blueprint passes input data to GravityPlayerController to be processed relative to gravity.

The user can also rotate the player 180 degrees to propel themselves forwards.

Platform Types

Player Rotation/Locomotion Blueprint Implementation

Applies rotation input to GravityPlayerController and calculates relative pitch for torso-rotation. Executed on camera input received.


Applies movement input to GravityPlayerController, input direction is passed to the animator to blend animations. Executed on movement input received.


180 Rotation Implementation.

Determines if player should aim forwards or backwards. Executed on "aiming" input received.
Lerps player rotation to face forwards or backwards. Executed on Tick.

User Interface

I designed functionality for most UI elements.

All menus use custom widgets to combine input received from gamepad and keyboard interaction.

Platform Types

Custom Widgets Blueprint Implementations

Custom Button.


Custom Option Selector.


Custom Slider.


Menu Blueprint Implementations

Main Menu.


Options Menu.


Options Menu - Set Video Options.


Options Menu - Set Slider Values.


Options Menu - Set Default Values.


Pause Menu.


Swap to Pause Menu. Executed on pause input received.


Level End Menu.


Game Over Menu.


Player Widget Implementations

Gameplay HUD.
Rotate prograde/retrograde velocity marker widget components relative to the player. Executed on Tick.


Returns the desired location for prograde/retrograde widgets in world-space.


Widget Management Implementations

Widget Swapping.


Remove BeginPlay Widgets from the player's viewport.


Remove Temporary widgets from the player's viewport.


Add starting widgets to the player's viewport.