Skip to main content

UE4 Laser

A visual effect with integrated logic for Unreal Engine 4.

This project was my starting point for learning the basics of Unreal Engine 4 as a self-taught developer. It involved several engine elements, such as materials, particle effects, code, and collision systems, making it ideal for getting started with UE4.

Recursive Propagation

The laser propagates recursively if it hits a material that allows it to be reflected (or continued if it hits a portal). To avoid cases where there might be infinite or too many laser reflections, a maximum number of bounces must be set, after which propagation stops. The maximum RayCast distance can also be modified for cases where the laser does not reach any object.

Final render

Test scene where the laser passes through portals and reflects off mirrors.

Options

The most important visual characteristics of the laser, such as color, width, and light intensity, can be easily modified. Recursion options can also be controlled here, as well as the categories (EObjectTypeQuery) of the objects susceptible to being hit by the laser.

Final render

Compute Shader kernel.

Demonstration of the lasers with a first-person camera