struct

TrailRendererComponent

Module
Game
Header
#include "Game/Components/TrailRendererComponent.h"
Namespace
Mowo
Reflection
Reflected by MowoHeaderTool

Properties

TypeNameDescription
floattimeHow long trail segment persists (seconds) Default 5.0f.
floatminVertexDistanceMinimum distance between new points Default 0.1f.
floatstartWidthWidth settings Default 0.5f.
floatendWidthDefault 0.0f.
Vec4startColorColor settings Default Vec4(1, 1, 1, 1).
Vec4endColorDefault Vec4(1, 1, 1, 0).
boolemittingRendering options Default true.
booldepthTestRespect depth buffer Default true.
boolenabledDefault true.
intmaxPointsAdvanced settings Default Misc::DefaultTrailMaxPoints.
std::deque<TrailPoint>history
Vec3lastPositionDefault Vec3(0, 0, 0).
boolinitializedDefault false.

Public functions

ReturnsNameDescription
voidClear
size_tGetPointCount
floatGetPointAgeGet age of a trail point (0.0 = new, 1.0 = about to expire)
Vec4GetColorForAgeGet interpolated color based on point age
floatGetWidthForAgeGet interpolated width based on point age
voidAddPointManually add a trail point (normally done by system)
voidPruneOldPoints

Function details

Clear

C++
void Clear()

GetPointCount

C++
size_t GetPointCount() const

GetPointAge

C++
float GetPointAge(size_t index, float currentTime) const

Get age of a trail point (0.0 = new, 1.0 = about to expire)

GetColorForAge

C++
Vec4 GetColorForAge(float age) const

Get interpolated color based on point age

GetWidthForAge

C++
float GetWidthForAge(float age) const

Get interpolated width based on point age

AddPoint

C++
void AddPoint(const Vec3& position, const Vec3& direction, float currentTime)

Manually add a trail point (normally done by system)

PruneOldPoints

C++
void PruneOldPoints(float currentTime)
Generated from Game/Components/TrailRendererComponent.h via game.json · Nov 5, 2026Version 1.0.0