Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
MovementComponent.h
Go to the documentation of this file.
1/**
2 * @file MovementComponent.h
3 * @brief ECS component storing an entity's velocity and maximum speed.
4 * @author Olympe Engine
5 * @date 2026-02-24
6 *
7 * @details
8 * MovementComponent is a plain-data ECS component used by movement tasks
9 * (e.g. Task_MoveToLocation in World mode). The task sets Velocity each
10 * frame; a physics/movement ECS system is expected to integrate the velocity
11 * and update the PositionComponent.
12 *
13 * C++14 compliant - no C++17/20 features.
14 */
15
16#pragma once
17
18#include "../../vector.h"
19
20namespace Olympe {
21
22/**
23 * @struct MovementComponent
24 * @brief ECS component: entity velocity and movement constraints.
25 */
27{
28 /// Current velocity vector (units per second) set by movement tasks.
30
31 /// Maximum movement speed (units per second). 0.0 means unconstrained.
32 float MaxSpeed = 0.0f;
33};
34
35} // namespace Olympe
< Provides AssetID and INVALID_ASSET_ID
ECS component: entity velocity and movement constraints.
::Vector Velocity
Current velocity vector (units per second) set by movement tasks.
float MaxSpeed
Maximum movement speed (units per second). 0.0 means unconstrained.