Implement player and AI input control
developThe InputComponent serves as a shared control-input state for players, AI, or demo sources. Other components read or modify movement, actions, and input signals from this component instead of handling raw InputEvents directly.
Common Control Patterns:
- Asteroids-style: Use
AsteroidsControlComponentfor unified spaceship/tank control (turning, thrusting, braking) instead of combining separate turning and thrust components. - Platformer Movement: Use
JumpComponent(handles vertical velocity viaCharacterBody2D.up_direction) in conjunction withPlatformerPhysicsComponent(for gravity and air friction). - Climbing: Use
ClimbComponentto enable platformer climbing insideArea2Dnodes like ladders or ropes. - Mouse/Joystick Aiming: Use
AimingCursorComponentfor reticle control (right-stick or mouse) orMouseRotationComponentto rotate an entity toward the pointer.