Unreal Engine Tips and Tricks

Hristo Enchev
Hristo Enchev
Published in
3 min readJan 14, 2020

I post these from time to time on twitter, but I might as well have them stored in this article as well.

Asynchronous delays with state checking

This macro is mainly useful in multiplayer development, as it allows you to efficiently use delays, because you no longer need to worry about the delay executing something too late. It checks the state in which the delay was initiated and only continues execution if the states match. The Async part is there as an assurance that the delay cant be overridden and refreshed if called again.

Here is an example: Imagine someone is capturing a flag in your multiplayer game. You want upon capturing a flag to and display a message and play a sound then wait 2 seconds put a 3d widget showing the flag carrier to team players. Now someone captures the flag a split second before the round ends, with this macro, the 3D widget after 2 seconds would never spawn, because the delay wont execute, as the state it

BSP Collision dependent level design pipeline

There are many reasons why custom asset collision might be required for your project. For example in competitive multiplayer shooters, asset collision is as simple as possible and often exactly the way the level designers intended it, so gameplay is maintained.

Something to keep in mind is that when converting brushes to blocking volumes to be used for collision, substractive brushes are detected as additive ones. Hence I would suggest to avoid designing with substractive brushes, and instead try to structure your levels with additive ones only. On the left you can see a screenshot from a UT Mod I worked on, and the boxes you see are exactly the level designer’s blockout, converted to blocking volumes. This saved a tremendous amount of time and allowed us to ensure consistency between blockout play-tests and final release.

Getting all points within a box

This was a request from the Unreal Slackers discord, and because of the vector transformations required in order to get proper bounds locations within a box, it can be tricky to get right, so here is a quick blueprint screenshot showcasing how to get your vector points.

Original twitter post.

Blueprint screenshot of random point snippet

Two Sided Sign

You can use the TwoSidedSign node to differentiate between the front and backfaces on Two Sided materials. This can be used for many things, one example being Dither AA on masked opacity, or the most common usage: un-flip backface normals.

Original twitter post.

Call of duty Modern Warfare Player Visibility

As you can see, specular, roughness and Fresnel are being lerped based on camera distance to actor position, and the end result is a cheap solution to ensure characters are visible at long distances all within their shaders. Can easily be replicated in UE4, here is a post which covers distance based shading

--

--

Hristo Enchev
Hristo Enchev

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