BUOYANCY SYSTEM

TYPE

Prototype


ROLES

Blueprint Scripter & Level Designer

 

YEAR

2020

 

TIME

2 Weeks

 

ENGINE

Unreal Engine 4

During our 2-week prototyping course in Unreal Engine 4, I worked with Johan Hyberg and we made a water buoyancy system

 

We were inspired by an area in Half-Life 2 where the player has to use the buoyancy of an object to lift a gate, and we wanted to create a buoyancy system that could be used for this style of puzzle game.


We knew we had to play around with adding force to an object to make it float.


We added a line trace from the object downwards to check for the ocean floor and applied force when it came close enough. The amount of force added depended on how close to the bottom the object was.

 

This method got the object to float, but the force added to the object was equal even if the object fell into the water at an angle, not causing it to align to the surface in a realistic way.


To achieve a more realistic effect, we made a component that could be attached to the object at certain buoyancy points. We then added force to these points based on how close they came to the ocean floor.


When the system was finished, we made items of different sizes and weights and built four levels to demonstrate how this system could be used in a puzzle game.


There is one issue that I would have changed if I remade this component today, and that is the fact that the script linetraces on every tick. I would have first not done the line trace, or done it less often, on objects that are stationary in the water. On other objects, I would have tried to reduce how often the line trace happens to save on performance.