A flying broom in Godot 4 that you steer with the camera
Gotic's first mod was a broom to fly across the island: look up to climb, look down to dive, and it lands by itself. How it's built and what broke along the way.

The broom was the first thing I added to Gotic once the island could be explored on foot. It floats and glows next to the starting beach (it's on the map too); walk up, press E (or COGER, "pick up", on a phone) and it's yours, strapped to your back. F or VOLAR ("fly") puts you on it wherever you are, and suddenly the whole island is within reach: forests, hills, the plateau and, later on, the four villages.
It was also the game's first mod: it lives in modulos/escoba/, and deleting that folder deletes the broom. Everything that came after (villages, fishing, sky rings) followed that template. And it's been the favourite so far: when the courier mod arrived, I made sure parcels could be delivered by air, and the time bonuses are tuned so that flying pays off.
How it's built
I didn't want flying to need more buttons than the game already had. So you fly where the camera looks: look up to climb, look down to descend. So that nudging the camera doesn't change your altitude, there's an 8-degree dead zone around the level-flight angle; beyond it, the climb grows 1.6 degrees per degree of camera, capped at 65:
static func climb_angle(camera_pitch: float) -> float:
var offset := camera_pitch - LEVEL_PITCH
var beyond := signf(offset) * maxf(absf(offset) - PITCH_DEAD, 0.0)
return clampf(beyond * PITCH_GAIN, -MAX_CLIMB_ANGLE, MAX_CLIMB_ANGLE)
On top of that there's SUBIR ("up", the same button as jump, or Space) and BAJAR ("down", Ctrl), each with its own acceleration so they respond the same even at full speed. Top speed is 14 m/s, the ceiling is 260 m (above the highest peak, 220 m), and touching ground or water while descending lands you automatically. In mid-air, BAJARSE ("get off") drops you.
The player rides astride using a forced pose (hips, knees, ankles, hands on the stick), and the body banks into turns and tilts when climbing. The broom itself is a few tubes and an ellipsoid from MeshBuilder, like all the art in the game.
Under the hood the broom is a mover: an object the player hands its movement to while flying. The boat and the festival dance reused that hook later.
What went wrong
- On the phone, the broom was nowhere to be seen. The saved game had the player almost 700 m inland from the beach. Now, if the save knows nothing about the broom and you're more than 30 m from its spot, it appears a few metres in front of you, and that spot is saved so it doesn't chase you around. The lesson: whatever a mod saves is a file format too, and the version already on the phone had saved
{owned, flying}with no position. - Turning the mod off left it on your back. The broom hangs from the player, not from the mod, so freeing the mod left it behind. Teardown now removes it, along with its HUD buttons.
- Boat and broom at the same time. Once the boat existed, two mods wanted to move the player. Taking off while sitting in the boat left it with a passenger "on board" in mid-air. Now the broom won't take off if someone else owns the mover.
- The tests weren't modular. The race mod's tests used the broom as "something that flies", so removing the folder broke the suite. It now uses a fake mover.
Measured on a Samsung S24 Ultra: 60 FPS flying up to 52 m with all 26 mods of the time enabled.
Still unverified
Above those 52 m there are no FPS numbers. Fog hides everything beyond 420 m, just like on the ground; opening up the view from high altitude would double the terrain chunks to draw, and I postponed it until I can measure on a phone flying high.