struct
TrailRendererComponent
- Module
- Game
- Header
#include "Game/Components/TrailRendererComponent.h"- Namespace
Mowo- Reflection
- Reflected by MowoHeaderTool
Properties
| Type | Name | Description |
|---|---|---|
float | time | How long trail segment persists (seconds) Default 5.0f. |
float | minVertexDistance | Minimum distance between new points Default 0.1f. |
float | startWidth | Width settings Default 0.5f. |
float | endWidth | Default 0.0f. |
Vec4 | startColor | Color settings Default Vec4(1, 1, 1, 1). |
Vec4 | endColor | Default Vec4(1, 1, 1, 0). |
bool | emitting | Rendering options Default true. |
bool | depthTest | Respect depth buffer Default true. |
bool | enabled | Default true. |
int | maxPoints | Advanced settings Default Misc::DefaultTrailMaxPoints. |
std::deque<TrailPoint> | history | |
Vec3 | lastPosition | Default Vec3(0, 0, 0). |
bool | initialized | Default false. |
Public functions
| Returns | Name | Description |
|---|---|---|
void | Clear | |
size_t | GetPointCount | |
float | GetPointAge | Get age of a trail point (0.0 = new, 1.0 = about to expire) |
Vec4 | GetColorForAge | Get interpolated color based on point age |
float | GetWidthForAge | Get interpolated width based on point age |
void | AddPoint | Manually add a trail point (normally done by system) |
void | PruneOldPoints |
Function details
Clear
C++
void Clear()GetPointCount
C++
size_t GetPointCount() constGetPointAge
C++
float GetPointAge(size_t index, float currentTime) constGet age of a trail point (0.0 = new, 1.0 = about to expire)
GetColorForAge
C++
Vec4 GetColorForAge(float age) constGet interpolated color based on point age
GetWidthForAge
C++
float GetWidthForAge(float age) constGet 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