EmitterContext Struct
Context data from the entity that triggered a spawn operation. More...
Declaration
Public Member Attributes Index
| const helios::math::vec3f | position |
|
World position of the emitting entity. More... | |
| const helios::math::vec3f | velocity |
|
Velocity of the emitting entity at spawn time. More... | |
| const helios::engine::ecs::EntityHandle | source |
|
Handle of the entity that is responsible for this EmitterContext. More... | |
Description
Context data from the entity that triggered a spawn operation.
EmitterContext captures the state of the emitting entity at the moment a spawn is requested. This allows spawned entities to inherit properties from their source (e.g., projectiles inheriting velocity).
Example usage: ```cpp EmitterContext ctx{ .position = spaceship->position(), .velocity = spaceship->velocity() }; spawnContext.emitterContext = ctx; ```
- See Also
- See Also
SpawnCommand
Definition at line 35 of file EmitterContext.ixx.
Public Member Attributes
position
|
World position of the emitting entity.
Definition at line 40 of file EmitterContext.ixx.
source
|
Handle of the entity that is responsible for this EmitterContext.
Definition at line 50 of file EmitterContext.ixx.
velocity
|
Velocity of the emitting entity at spawn time.
Definition at line 45 of file EmitterContext.ixx.
The documentation for this struct was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.