Repository navigation
Vortex Engine v3.4.9 — Areas (zones) and terrain holes
Vortex Engine v3.4.9 — Areas (zones)
Regions of the world with tags, properties and events — a cave, a no-fly zone, a village, a safe zone — as big as a level, nothing hard-coded.
- Area component: a box, a sphere or a vertical cylinder around its entity, moved, turned and scaled like any other (Create ▸ Area (Zone), Add Component ▸ World ▸ Area,
create_area). Tags ("cave", "no-fly") and free properties ("flightAllowed=false", "ambient=cave_drips") carry the meaning; the engine only tracks who is inside, every tick. - Events: every behaviour of an entity that enters, stays in or leaves an area gets
OnAreaEnter(AreaInfo),OnAreaStay(AreaInfo, dt)andOnAreaExit(AreaInfo); a manager subscribes toAreas.Entered/Areas.Exited.AreaInfohas the name, the tags,HasTag,Get/GetBool/GetFloatfor the properties, the priority and the position. - Queries:
Areas.IsInside(id, "cave"),Areas.Of(id)(highest priority first),Areas.Current(id),Areas.At(point),Areas.IsPointInside(point, tag),Areas.Find(nameOrTag),Areas.Track(id)for entities without scripts. .vareafiles: a reusable definition (shape, size, tags, properties, colour, priority) in plain JSON. The inspector's Save as… writes one intoAssets/Areasand links it; Load reads a linked file; many areas can share one. Tools:set_area,list_areas,areas_at,save_area_file.- The viewport draws every area's outline in its colour, the selected one bright; Draw in game shows it in play mode too.
- The Open World template ships a "Grove" box (tags grove, no-fly; flightAllowed=false) over the jungle corner, a "Lake dome" sphere,
Assets/Areas/Grove.vareaandZoneManager.cs, which logs every entry and exit and shows where a no-fly rule goes. - Holes in the terrain (the first half of caves): the Terrain Editor's new Hole tool (Sculpt tab; Shift fills a hole back) cuts the cells under the brush out of the terrain — the mesh at every LOD, the collision and the navmesh leave them out, the height query and the terrain raycast look through them, so a cave mesh placed under the terrain becomes the ground there. Saved in the
.vterrain(a flag bit, one byte per sample; older editors ignore it).sculpt_terraintakesop: "hole"and"fill".