Custom HoverCraft physics in Unreal Engine

Hristo Enchev
Hristo Enchev
Published in
3 min readApr 2, 2019

Suitable for games controlled via a giant trackball, or anything else really

Please do mute the audio :)

Responsibilities:

  • All gameplay functionality
  • Animation
  • Lighting

Development Time: 3 weeks

The Process:

One of the projects at my University is referred to as the “marmalades”, because for 8 weeks we have to create three games, one of which always has to be with a custom physical controller. We decided on a racing game being controlled by a physical trackball, and later on, I pitched the idea to convert this into a 2 player game, one person controls the acceleration and direction, the other the balance of the vehicle. The idea was well received and the prototype was immediately fun to play around with, so the programmers delved into Arduino, gyroscope sensors and a big trackball, while I created the hovercraft physics and synced the gyroscope’s absolute rotation, to the balance of the hovercraft vehicle inside Unreal, the hovercraft physics, although rudimentary, was perfect for this project, and ultimately gave the game its identity.

Hover Force showcase

In this video, you can see an early version of the hovercraft, more specifically, how its responsiveness to the ground can be controlled, just like vehicular suspension. And it works in a similar fashion. It looks for a ground surface using as many line-traces [raycasts] as you need, for stability I used 4, once a ray has found a ground, it will apply forces to the vehicle in an effort to get the origin point of the line-trace at a specified height from the ground.

Movement Grip showcase

Lastly for the hovercraft tech, here is a short clip which highlights movement grip, along with debug lines to help visualize what is happening.

SpaceDustStudios highlight a similar approach in their arcade physics breakdown video here.

For a three week project, the artists on my team decided their time would be better spent on the environment, rather than on rigging a vehicle. So I offered to procedurally animate it. The data from the custom controllers, coupled with the physics data from the hovercraft was enough to drive a few parts of the vehicle and bring it to life. But there is no denying that it would have looked better with a wiggling rigged antenna on the top.

Procedural Animation

In the first week of the project, our custom controllers were yet to be defined, but we did know that we wanted a racing game, so I quickly created a tool for my level designer to rapidly create and test various tracks. Not only is it structured to work with any kind of assets, but the process of adding new track pieces was streamlined so that artists themselves can set up and test the track assets.

Track Tool

By the end of the project, I had added spline functionality, scene-based color selection, gradients, along with custom materials applied to each face of the asset, utilizing projected world aligned normals, eliminating the need for artists to fiddle with custom UVs, thus speeding up the iteration process on both level design and art.

Since this game was built for physical custom controllers, it is not on itch.io as it cant represent the intended gameplay experience without the controllers.

--

--

Hristo Enchev
Hristo Enchev

An ambitious technical game designer, who also likes photography, graphic design and … well video games