Skip to main content

components Folder

Files Index

filehelios/engine/modules/physics/motion/components/_module.ixx

Aggregate module for helios::engine::modules::physics::motion::components namespace. More...

fileDirectionComponent.ixx

Component for storing a normalized direction vector. More...

fileMove2DComponent.ixx

Component for 2D physics-based movement . More...

fileSteeringComponent.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

ComponentDescription
Move2DComponent2D movement physics: velocity, acceleration, dampening.
SteeringComponentHeading/rotation physics: turn speed, rotation dampening.
DirectionComponentStores a normalized direction vector.
SpinComponentContinuous rotation around an axis (visual effects).
RotationStateComponentComposite 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.