Complex Simplicity (Or How to Keep a Gargoyle from Breaking Unity)

Expirado
Complex Simplicity (Or How to Keep a Gargoyle from Breaking Unity)

Continuing with the development of Vandor the boss waiting for you in Ghoulstorm after surviving a lovely swarm of vampire bats I faced the classic indie developer dilemma: How do I design a boss that feels smart and threatening without losing my mind in the process?

The theory in my head was flawless. If a basic enemy only has four elemental states (running toward you via the NavMesh, attacking when close, flinching when hit by a bullet, and triggering a ragdoll upon death)... how hard could it possibly be to slap wings on a gargoyle?

Spoiler alert: Famous last words.

Theory on paper: "It's just adding wings."
Reality in Unity: "The NavMeshAgent has decided to fly into the infinite void."

The (Ideal) Plan on Paper

I wanted Vandor to retain the essence of the base AI system that already worked so well, but adding a hybrid behavior pattern:

  1. On Ground: Pursues and attacks you just like any other enemy eager to ruin your day.

  2. In the Air: Upon taking a certain amount of damage, instead of backing down, it triggers the Fly animation, ascends into the sky at a customizable height and speed, and begins to orbit around you in the air like a vulture stalking its prey.

  3. The Dive-Bomb: After a few tense seconds in the air, it dives straight down toward your position to finish you off, landing smoothly to resume ground pursuit.

  4. The Fall: If it accumulates enough fatal hits—whether on the ground, taking off, or mid-flight—the animations cut out, gravity does its work on the Ragdoll, and Vandor crashes down dramatically, triggering the victory menu and score counter.

To achieve this without rewriting the game from scratch, the recipe seemed simple: keep the base EnemigoIANuevo script, add a new boolean parameter called volar (fly) to the Animator Controller, drag and drop a few transition arrows (Run ➔ Fly ➔ Hit ➔ Attack... see screenshot below), and control the elevation from an independent script.

Caption: The "simple" node map of the Animator. A couple of arrows here, a few triggers there... and fingers crossed.

Development Reality: Fighting Math and the NavMesh

What looked like a walk in the park on paper turned into a fun little duel against console exceptions inside Unity. Making sure an AI maintains its ground navigation anchor while deciding to "disobey gravity" to climb into the sky without sending the engine into a panic requires a healthy dose of patience (and plenty of coffee).

After tweaking the flight timings, safeguarding the hit coroutines so Vandor wouldn't try to "walk" while hovering 4 meters above your head, and polishing the animation transitions, the result turned out spectacular. The VR immersion when you see a massive creature take off right in front of you and circle you in 360 degrees is breathtaking.

What's Next?

With Vandor's AI ready and the combat polished down to the last detail, I consider the level's action logic complete. Now it's time to put on the level designer hat and shape up the Hallows Hill cemetery zone where this epic aerial battle will take place.

See you in the next devlog update!

Image

An independent VR horror shooter for Meta Quest. Developed by Iniciocreativo. © 2026 GhoulStorm. All rights reserved.

Image
Image