struct
LaserBeamComponent
- Module
- Game
- Header
#include "Game/Components/LaserBeamComponent.h"- Namespace
Mowo- Reflection
- Reflected by MowoHeaderTool
Properties
| Type | Name | Description |
|---|---|---|
Vec3 | direction | Laser direction (local space, will be transformed by entity rotation) Default Vec3(0, 0, 1). |
float | maxLength | Length settings Default 100.0f. |
float | width | Visual settings Default 0.05f. |
Vec3 | color | RGB color Default Vec3(1, 0, 0). |
float | intensity | HDR intensity for bloom Default 5.0f. |
bool | fadeAtEnd | Fade settings Default true. |
float | fadeStartPercent | Start fading at this % of length Default 0.8f. |
bool | useRaycast | Physics settings Default true. |
uint32_t | layerMask | Which layers to hit Default 0xFFFFFFFF. |
bool | hitSomething | Runtime state (updated by system) Default false. |
Vec3 | hitPoint | Default Vec3(0, 0, 0). |
Vec3 | hitNormal | Default Vec3(0, 1, 0). |
float | hitDistance | Default 0.0f. |
uint32_t | hitBodyID | Default 0. |
bool | enabled | Rendering options Default true. |
bool | depthTest | Default true. |
bool | drawHitPoint | Default false. |
Public functions
| Returns | Name | Description |
|---|---|---|
float | GetActualLength | Helper to get actual length (either maxLength or hitDistance) |
Vec4 | GetHDRColor | Get color with intensity as Vec4 (alpha = 1) |
Vec4 | GetColorAt | Get color at position t (0.0 to 1.0 along beam) |
Function details
GetActualLength
C++
float GetActualLength() constHelper to get actual length (either maxLength or hitDistance)
GetHDRColor
C++
Vec4 GetHDRColor() constGet color with intensity as Vec4 (alpha = 1)
GetColorAt
C++
Vec4 GetColorAt(float t) constGet color at position t (0.0 to 1.0 along beam)
Generated from Game/Components/LaserBeamComponent.h via game.json · Nov 5, 2026Version 1.0.0