Move2DSystem Class
System that processes 2D movement for entities. More...
Declaration
Public Member Typedefs Index
| using | EngineRoleTag = helios::engine::common::tags::SystemRole |
Public Member Functions Index
| void | update (helios::engine::runtime::world::UpdateContext &updateContext) noexcept |
|
Updates movement for all applicable entities. More... | |
Private Static Functions Index
| static helios::math::vec3f | moveGameObject (helios::engine::modules::physics::motion::components::Move2DComponent *cmp, helios::math::vec3f currentDirection, float deltaTime) noexcept |
|
Computes translation delta for an entity based on its Move2DComponent state. More... | |
Description
System that processes 2D movement for entities.
This system reads from Move2DComponent and applies physics simulation including velocity integration and dampening when input is inactive.
The system updates TranslationStateComponent with the computed translation changes each frame.
Required components:
- Move2DComponent (physics configuration and state)
- DirectionComponent (current movement direction)
- TranslationStateComponent (receives translation updates)
Definition at line 45 of file Move2DSystem.ixx.
Public Member Typedefs
EngineRoleTag
|
Definition at line 119 of file Move2DSystem.ixx.
Public Member Functions
update()
| inline noexcept |
Updates movement for all applicable entities.
For each entity with Move2DComponent, computes translation changes and applies them to the TranslationStateComponent.
- Parameters
-
updateContext Context containing deltaTime and other frame data.
Definition at line 128 of file Move2DSystem.ixx.
Private Static Functions
moveGameObject()
| inline nodiscard noexcept static |
Computes translation delta for an entity based on its Move2DComponent state.
Calculates velocity changes based on input state. When input is active, accelerates in the facing direction. When inactive, applies exponential drag to slow down. Velocity is clamped to maximum speed.
- Parameters
-
cmp Pointer to the Move2DComponent.
currentDirection The current direction vector from DirectionComponent.
deltaTime Frame delta time in seconds.
- Returns
Translation delta to apply to the entity this frame.
Definition at line 64 of file Move2DSystem.ixx.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.