Spawns spark bursts + impact flash quads on hit events.
More...
#include <ImpactEffect.hpp>
|
| void | update (float dt) |
| | Advance spark physics and fade alpha over time.
|
| |
| void | spawn (glm::vec3 pos, glm::vec3 normal, SurfaceType surface, float frameDt) |
| | Spawn 8-16 sparks + 1 flash at the impact point.
|
| |
| const BillboardParticle * | data () const |
| |
| uint32_t | count () const |
| |
Spawns spark bursts + impact flash quads on hit events.
◆ count()
| uint32_t ImpactEffect::count |
( |
| ) |
const |
|
inline |
◆ data()
◆ spawn()
| void ImpactEffect::spawn |
( |
glm::vec3 |
pos, |
|
|
glm::vec3 |
normal, |
|
|
SurfaceType |
surface, |
|
|
float |
frameDt |
|
) |
| |
Spawn 8-16 sparks + 1 flash at the impact point.
- Parameters
-
| pos | World-space impact position. |
| normal | Surface normal at the impact point. |
| surface | Surface material type controlling spark appearance. |
| frameDt | Current frame delta time, used for single-frame flash lifetime. |
◆ update()
| void ImpactEffect::update |
( |
float |
dt | ) |
|
Advance spark physics and fade alpha over time.
The documentation for this class was generated from the following files: