components Folder
Files Index
| file | helios/engine/modules/physics/motion/components/_module.ixx |
|
Aggregate module for helios::engine::modules::physics::motion::components namespace. More... | |
| file | DirectionComponent.ixx |
|
Component for storing a normalized direction vector. More... | |
| file | Move2DComponent.ixx |
|
Component for 2D physics-based movement . More... | |
| file | SteeringComponent.ixx |
|
Component for managing entity heading and rotation physics. More... | |
Description
helios::engine::modules::physics::motion::components
Physics and movement components for game entities.
This namespace contains components that handle physics simulation, movement, rotation, and related behaviors.
Components
| Component | Description |
|---|---|
| Move2DComponent | 2D movement physics: velocity, acceleration, dampening. |
| SteeringComponent | Heading/rotation physics: turn speed, rotation dampening. |
| DirectionComponent | Stores a normalized direction vector. |
| SpinComponent | Continuous rotation around an axis (visual effects). |
| RotationStateComponent | Composite rotation state from heading and spin. |
Usage
Move2DComponent and SteeringComponent work together for ship-like movement:
auto& move = gameObject.add<Move2DComponent>();
move.setMaxSpeed(30.0f);
move.setAcceleration(20.0f);
auto& steering = gameObject.add<SteeringComponent>();
steering.setRotationSpeed(360.0f);
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.