How to implement vehicle AI in UE4

BP_Player blueprint
Click to view in Blueprint Viewer

Unreal Engine 4 has a character AI implemented out of the box. And I have already posted about simple behavior trees. But what about non-characters? Well, this is unknown territory. But good thing Epics left some hooks which you can use to turn things alive. This is a tutorial on how to implement a simple vehicle AI in UE4.

Setting up a project

I’ll try to make things as simple as possible, so let’s use the basic assets. We’ll use Advanced Vehicle C++ template as a starting point. Read More

Setting up UE4 Character jumps

A trajectory of some random UE4 character jump

The game I currently am working on is quite heavy on all kinds of jumps, so I dedicated some time to investigate how to configure UE4 character jumps properly. Some random values I put in Jumping / Falling section of Character Movement component did not work well for me:

I drew a trajectory of my jumps before I started tweaking the config values. You may notice that they are not symmetrical – the reason for that is the character (a lamp in my case) speeding up horizontally during a jump. This does not make sense for projectile motion. Read More

Orthographic camera projection in UE4

In some games or game genres, a typical 3d perspective camera projection does not really work. For example, classic 2d platformers (2d by definition does not have a perspective) or top-down shooters. And since UE4 is a 3D engine in the first place, one gets a question: how to implement an orthographic camera in UE4?

Orthographic camera

Fortunately, Unreal Engine has an option for such camera mode. You can enable it in Camera Settings for a Camera Actor: Read More

Custom Depth and Custom Depth Stencil in UE4

Ever wondered how to implement occlusion masking in UE4? I wanted this effect for my game – so I spent some time googling and ended up in Post Process material section of Unreal Engine Documentation. You might be too. There is plenty of tutorials about the use of Custom Depth and Custom Depth Stencil Value material nodes on the Internet. I personally find this youtube video quite helpful:

Tom Looman’s tutorials are pretty good too: https://www.tomlooman.com/the-many-uses-of-custom-depth-in-unreal-4/ Read More