Skip to Content
Procedural Slash TrailOverview

Overview

Procedural Slash Trail is based on Unity’s Visual Effect Graph and Shader Graph.

It allows you to easily create trails that smoothly follow your attack animation, while still giving you the freedom to tweak the shape. You can adjust parameters like length, curvature, thickness, width, and radius, with real-time adjustments based on in-game data. For example, depending on the weapon equipped, the trail for a dagger can be narrower, while a long sword’s trail can be wider, and you can increase the radius to reflect the increased melee reach.

In addition to the final shape, you can also control how the trail evolves over time. For instance, you can increase the brightness at the tip based on distance before the weapon completes its swing animation, and have it fade out over time once the swing finishes.

The shader is made up of multiple reusable sub-graphs, allowing you to not only easily adjust the trail’s appearance but also use the same sub-graphs for other effects beyond trails.

Last updated on