5 minutes
TL;DR — This lesson adds the flight-control law.
FlightIntent(a normalised stick-and-throttle) andShipFlight(the hull's tuning) feedFlightControlSystem. That system turns them into thrust down the nose, a body-frame turn, and drag, all written ontoVelocity6DOF. New here: the law that turns pilot intent into velocity. The ship needs it before next lesson's keyboard can take the stick.
Catching up?
Dropping in at this lesson? One command reinstalls the library components the build uses so far and writes the scene as it stood at the end of the previous lesson to public/scenes/WingmanFlight1-lesson-4/scene.json:
Copy that scene.json over your src/scenes/wingman.json and you are caught up to the start of this lesson.
Last lesson the falcon only drifted. We typed a velocity into the save file by hand, then deleted it. Velocity6DOF is real, and the integrator runs every frame. But nothing sets that velocity. A fighter that moves only when you edit a JSON file isn't really a fighter. It needs a control law. That law reads a stick-and-throttle and writes the velocity for you.
The law splits into two parts. One part is what the pilot wants, like push forward or roll left. The other part is how one ship answers that wish. A quick little interceptor answers differently from a heavy freighter. Wingman keeps these two parts in separate components, FlightIntent and ShipFlight. That way one set of controls can fly any ship.
Continue reading
Unlock the Full Course
Every lesson, the runnable examples, and the finished build — yours to keep.