Second Chance GazetteDevlogToken Use

Pivot Point

unreal-enginematerialsfoliageworld-position-offsethismnavigationnav-linksnpc-routinesblueprintsblenderclaude-codegta-6

Two pivots

It was a Thursday, so James was at work, and the game got built from his phone. That week he had started running the work through the beta of Claude Code's Projects feature: a planner hands the jobs out to several agents running Claude Code Opus 5.5, the agent from here on, and they share the one editor at home and take turns on the play button. On Thursday there were two jobs. One session was laying out the streets and gardens of the new upmarket estate. The others were giving the town's thirty named residents something to do once they got where they were going.

By midnight both jobs had run into the same mistake. Each time, something had been measured from the wrong pivot: a door from its hinge, and a flower from a point fifty metres away.

The hinge

The first resident who needed help was Vera. Every morning her routine took her to her own front door, the door swung open, and she walked into it and stopped. James had sent word to give her a different house, so the agent moved her to No. 4 on another terrace, a copy of the house where a neighbour got out every morning without any trouble. Then it watched her try to leave the new one. She stuck again.

What it found next was the real fault, and it was all over the town. Every front door in the game is a Blueprint whose origin sits on the hinge. The invisible link that tells walkers they can pass through a doorway had been put on that origin too, so the route out of the house ran straight down the hinge line. The doors open inwards. Fully open, the door lies along exactly that line. Vera did what the route told her and walked into the back of her own front door, 45 cm inside the hall.

The agent moved her door's link 43 cm across, to the middle of the opening. At eight the next game morning she walked out of the front door at an ordinary pace and on down the street to work.

A woman in a cream jumper, dark leggings and white trainers walks towards the camera along a shaded terrace footway, low brick garden walls on the right and a green wheelie bin on the left, with a refuse depot sign and blue sky behind.
Vera on her way to work, a few seconds after leaving the house. Before the fix, the open door stood exactly where her route told her to walk.

Then it counted how many other doors had the same fault, and the count was wrong. It had read which way each door faced from a setting that reads zero on every door in the game, because it is measured relative to the door itself. So the count was right only for doors that happened to face the same way as the world grid. Seven doors it flagged were fine, and it had missed others. A second count measured the door leaf itself, hinge to latch, and found the link on the hinge on 18 of the 30 residents' doors.

A message from James came back from work: either move the npcs to another house or fix all the effected doors. The agent fixed all of them. It moved 27 links and rebuilt the navmesh, then compared the result against the previous build cell by cell: not one walkable cell had been lost anywhere in town. Lee had been standing 2.8 metres to one side of his own door and 1.4 metres up, being cleared away by a watchdog and reappearing in the same spot. The next morning his door opened, he stood on the step for a moment, and he went down the street at 140 cm a second.

Hedges, a school and a bench

The hedges began with one of the agent's own reports being wrong. The day before, it had reported that the lane's hedges had 44 gaps of 4.8 metres that people were walking through. James's reply was that people walking through gaps in a hedge was fine, and walking through the hedge itself was not. When the agent went to look at the gaps, they were not there. Every hedge position along the lane has two segments with the same label, one on each side, and the earlier report had paired them by label and measured across the lane.

The real fault was smaller. Each hedge's invisible collision box was 2 metres long on a hedge 2.76 metres long, and narrower than the leaves, so people brushed through the leafy ends. The agent resized the box in the hedge's Blueprint, which changed nothing for the 137 hedges already in the level, because each placed copy had kept its own value. It had to write the new box to all 137 one at a time.

Measuring them turned up something else. Twenty-two hedges down the lane were buried, and eleven of those were inside the primary school, about ten metres below the roof line. The school had been built over the lane after the hedges went in. yes tidy the hedges, James sent. The eleven in the school were deleted and the rest lifted back onto the ground.

Then the chippy. At lunchtime, four of the residents used to stand in a huddle against the blank side wall of the building next door, five and a half metres from the chip shop's door, facing the brick. Now they go in. The agent built the first stage of a lunch routine: three seats and three standing spots by the counter, each claimed by name and given back when that person's lunch hour is up. In the test, Tracey and Vera came in for their snap, sat on the bench with their feet on the floor and faced into the shop. When the clock passed three they got up and walked out of the door, back to work.

Inside a chip shop from above: two women sit side by side on a wooden bench against the wall, hands in their pockets and feet on the floor, one in a pink hoodie and one in a cream jumper, with the dark serving counter on the right.
Tracey and Vera on the chip shop bench at lunch. A week earlier the lunch crowd stood outside, against the next building's wall.

Queuing at the till and paying is the next stage. GTA 6 is set in a version of Florida. This town's lunch break is a wooden bench in a chippy, and most of the British half of the argument is made of things that size.

The club got a doorman and a barmaid on a rota, so that every night it is open has one of each. The barmaid's first animation was wiping the bar, and it bent her nearly double over the counter. James looked at it and dropped the routine: she could just dance behind the bar. The agent picked the gentlest dance on her skeleton, with the hips moving five to eight centimetres, and James said the dance was good. One of the club's regulars had hair that James said was prone to coming off. It was disappearing as you walked up to her, because the close-up version of her hair had been stripped down to a single strand and only the distant version had anything in it. A clean copy from the original pack fixed it. Her glass still hangs upside down in her hand.

Fifty metres from the flowers

Over the same day the estate session laid the new roads with five T-junctions, three turning heads, two bellmouths and 48 drives, then hedges round every plot, street trees and 71 gas lamps. At the first night test the lamps were floodlights. The road was close to white from end to end and the trees glowed lime green. Each lamp went down from 8,000-10,000 lumens to 1,100-1,500, with a reach of 10 metres instead of 18, until the street had pools of light with dark between them. yes I approve that look, James said.

A wide avenue at night under a starry sky, a black Victorian-style gas lantern on the left verge glowing white. Warm light pools on the road and footway near the lamp and falls away to darker tarmac on the right, with lit trees and villas down the street.
The avenue at night after the lamps were turned down. The first version lit the whole road like a supermarket car park.

Then the gardens. Mixed borders went in along every boundary, planted in drifts, with a bed along each house front, a specimen tree or two on every lawn and yew cones either side of the grander front doors. That came to 30,728 plants in 215 instanced groups. the gardens are looking beautiful now, James wrote.

They were, apart from the flowers in the sky over one garage.

A large red-brick Georgian-style house with a stone porch and a double garage, a lawn in front and a flowering shrub in the foreground. Clumps of blue, yellow and red flowers hang in the sky above the garage roof and beside the house, metres off the ground.
The gardens as first placed. The blue, yellow and red clumps over the garage roof belong in the border underneath it.

The agent started with the ground. It sampled 8,665 of the plants and found every one within 60 cm of the landscape, so the plants were in the right place and only the drawing was wrong. It traced that to the wind. The flowers come from a bought pack that works out its sway in the material, and part of that sway grows with the distance between each point on the plant and the plant's own pivot. To save memory, thousands of plants are drawn as copies inside one group. Drawn that way, the pivot the material reads is the group's, not the plant's. A flower fifty metres from its group's origin swayed by fifty metres' worth, which is several metres, and it swayed upwards as well as sideways.

The agent's first fix was to turn the wind off on the flowers. They stopped floating, and they stopped moving at all. James asked for the movement back: I would like the flowers to sway slightly with wind but not too much. The second fix measured from the centre of each plant instead, gave each copy its own timing so a whole bed does not move in step, and halved the effect. The fix went into the wind code the whole pack shares, so the roses and the beds by the river now sway at half what they did before as well.

The same red-brick house and double garage from the same spot. The sky is clear, and a strip of yellow, blue and red flowers now runs along the foot of the house and the garage on dark soil beds, with a green cone of topiary by the front door.
The same garden from the same spot after the fix: soil under the beds, a leafy cone by the door, and nothing above the garage.

The second pass added soil under the beds and leafy topiary where the flat green cones had been. Behind each of the seven big houses it laid a quartered parterre: four beds of roses and blue flowers in clipped box, round an urn. That made about 50,000 plants in all. James has put the frame-rate test into a full optimisation pass, and the gardens are first in it.

Looking down on the back of a brick villa in low sun: four rectangular beds edged with clipped box hedge, two of red roses and two of blue flowers, set in quarters round a stone urn on a grass cross, with long mixed borders and a young tree beyond.
A parterre behind one of the landmark houses in low sun: roses and blue flowers in clipped box, round a stone urn.

Seventy listings

A third session spent the day in Blender and did not touch the editor. It went through about seventy estate agents' listings for big houses and sorted what it saw into seven interior styles: Victorian, Arts and Crafts oak, Regency and Georgian, contemporary, warm minimal, traditional family, and the collector whose shelves are full. It drew floor plans for all 22 homes on the estate, with more bedrooms and bathrooms the bigger the house, from one bathroom up to fourteen. It modelled 146 pieces: furniture, kitchens, fireplaces, curtains both open and drawn, eight kinds of internal door, and 33 valuables you can carry, each with a price and a size.

James looked at the first furnished house and asked for it neater: no overlapping, mirrors and paintings flush to the walls, rugs centred in the floor space. The agent rewrote the furnishing rules, and a check over 44 test layouts found no overlaps.

Four Blender renders of one furnished house: a drawing room with a chesterfield, a rug, a piano and a crystal chandelier; a hall with a turned-baluster staircase, a runner and a longcase clock; a fitted kitchen; and a bedroom with a four-poster bed.
The first furnished house, rendered in Blender: drawing room, hall and stair, kitchen and main bedroom. Bringing it into Unreal is next.

The plan is for front and back doors to be locked nine times in ten, for room lights to come on when somebody moves inside, and for some of what is on the mantelpiece to be light enough to carry out. All of that is still to build in Unreal. Rockstar have a department for interiors. This was one session of the agent working from estate agents' photographs while James was at work.

The wagon

The last job of the day was the bin round. For weeks a test lorry and two loaders had stood on one terrace, left over from filming. James described what it was meant to be: it should actually start from the depot and do the rounds, with nobody working the job. The agent deleted the test copy and put the five bins it had moved back where they belonged. Then it built a director that runs the round as plain numbers while the player is far away, checking once a second, and swaps in the real wagon and two real loaders when the player comes within ninety metres.

On the first day of the test, the crew drove their route and did not pick up a single bin. The round's data holds two lists that are meant to line up. One gives the stretch of street each part of the round covers, in street order. The other gives where each part starts, in the order the lorry visits them. Every lookup from one list into the other landed on the wrong street, and that was true for all seven days of the week. An earlier test of day two had worked by luck. The agent rewrote the one list into visit order and fixed the script that generates it, so a rebuild keeps the right order. On the next run Trev and Gav loaded thirteen bins along two streets and put every one back where it came from, to within a few centimetres.

A teal and orange council refuse lorry on a terraced street, a brown wheelie bin raised on the lift at the back. Two loaders in yellow hi-vis vests and orange trousers stand in the road behind it, and another brown bin waits on the pavement.
The simulated round on a terrace: a bin on the lift and both loaders in the road behind the wagon.

James watched it and had two notes: the men were standing on tiptoe at the back of the wagon, and when it moved they slid along behind it. At five past midnight the agent swapped the idle pose for a flat stand and matched their walk to the lorry's real speed, so that fix was Friday's.

The fault

Foliage floats metres above the ground in Unreal Engine 5.8 when wind-animated plants are placed in a HISM

Flower clumps rendered metres above a garage roof, mostly far from their host's origin. The placement was right: 8,665 sampled instances all sat within 60 cm of the landscape. It was render only.

Cause: the foliage pack's shared wind material function adds a "branch wind" term to X, Y and Z, equal to sin(time) x Distance(WorldPosition, ObjectPivotPoint) x Branch Wind Intensity (0.08 here). In a hierarchical instanced static mesh, ObjectPivotPoint is the host component's origin, not the instance's, so an instance 50 m from the origin gets metres of offset.

Wrong first fix: turning World Position Offset off on the hosts (set_evaluate_world_position_offset(False) before adding instances). It stopped the floating and stopped all sway.

The fix

Measure wind from the mesh's own origin, not ObjectPivotPoint

In the wind material function, replace the distance term with length(PreSkinnedPosition), which is mesh-local and therefore correct per instance. Add PerInstanceRandom x 13 to the phase so instances do not sway in step, and scale the whole output by 0.5. One graph edit and one recompile of the shared function; every material that uses it gets the fix.

The guard: any material that reads ObjectPivotPoint or object position behaves differently inside a HISM. Test a wind-animated mesh as an instance far from its host's origin before placing thousands of them.

The fault

NPC walks into its own front door and gets stuck: the nav link runs down the hinge line

A resident reached her front door, the door opened, and she pressed into the leaf 45 cm inside the hall and stopped. The door Blueprint's origin is the hinge, and the door's nav link points had been placed at that origin. The door opens inward and, fully open, lies along about -12 to +8 cm from the hinge: on the link.

A first census of affected doors used the door's closed-yaw setting as its frame. That value is 0 on every door because it is relative to the actor, so the census was correct only for doors at an actor yaw near 0. It misreported seven doors and missed others.

The fix

Measure each door in its own frame from the mesh (hinge = actor origin, latch = the far corner of the leaf's bounds) and shift any link that crosses within 20 cm of the hinge to mid-opening (43 cm here): 18 of 30 home doors, 27 link packages. Move the link points. Moving the link actor does not re-gather and the path keeps the old line. Rebuild the navmesh and compare walkable-cell coverage with the previous build (0 cells lost here) before saving it.

The fault

NPCs walk through hedges at the ends of a row: collision box shorter than the mesh

The hedge mesh spans local X -37 to 239 cm and Y ±95, but its collision box covered X 0 to 200 and Y ±62, so walkers brushed through the leafy tips. Changing the Blueprint default changed none of the 137 placed hedges, each of which kept its own instance override.

The fix

Fit the box to the mesh and write it to every placed instance

Box centre (101, 0, 102.5), extent (138, 85, 102.5), set on the Blueprint and on all 137 placed instances, then a navmesh rebuild. The boxes are not bridged to their neighbours, so a real gap stays walkable.

The fault

Simulated bin round never picks up a bin: two data lists in different orders

The round's data asset indexed one list in street order while the run start points and run names were in visit order. Every cross-lookup landed on the wrong street, on all seven days. One earlier day-two success was luck.

The fix

Rewrite the index into visit order, and fix the generator

Rewrite the one list into visit order after checking each address and run name against the source round data, and patch the seeding script the same way so a reseed cannot bring the old order back.

The kit

ToolWhy this one
Claude Code Projects (beta)a planner splitting the day across several Opus 5.5 agents on one editor
Unreal Engine 5.8where the floating flowers and the stuck doors could be seen
A cell-by-cell navmesh coverage countproved 27 moved door links cost no walkable ground anywhere in town
Blender, run headless from scripts146 interior pieces and the leafy topiary, all rebuildable
Estate agents' listingsabout seventy of them, the reference for seven interior styles

Plain English

TermWhat it means
World Position OffsetA material setting that nudges a model's surface points to new positions as it draws, without touching the model itself - used here to fold a shirt hem under a waistband.
HISMOne object in the level that holds thousands of copies of the same model and draws them together. A street's worth of downpipes costs roughly what one downpipe costs. The hierarchical version also picks the right level of detail per copy.
pivotThe point a model rotates and scales around, and the point it sits on when placed. A pivot in the wrong place makes an object float or sink.
material functionA reusable chunk of material logic that many materials share, so one fix in it changes every material that uses it.
nav linkA hand-placed bridge that tells the pathfinder two patches of navmesh are joined, for gaps it cannot see across on its own - a narrow doorway, a jump, a ladder. Both ends snap to the nearest walkable floor, which is right until the nearest floor is the one below.
navmeshAn invisible map of walkable ground that characters use to work out routes. No navmesh, no walking.
BlueprintUnreal's visual scripting. Logic built by wiring boxes together with lines instead of typing code. This whole game is built in it.
instance overrideA setting changed on one copy of a Blueprint placed in the level; it beats the Blueprint's own default, so changing the default later does not reach that copy.
collision hullThe invisible simplified shape used for bumping into things. It is not the shape you can see, which is why invisible walls happen.
data assetA file holding just settings and numbers - prices, opening times, stats - separate from the logic that uses them.
groomHair built as individual strands rather than as a textured surface. Looks far better, costs far more to render.
PIE"Play In Editor" - pressing play inside the editor to test the game without building it first. Fast, and it behaves subtly differently from the real build.

Things we still need to fix tomorrow:

  • Seven residents have been seen walking out of re-linked doors. Watching the other shifted doors in play is next.
  • The estate's gardens add about 50,000 plants. Their frame-rate test is part of the optimisation pass.
  • The gas lanterns' glass glows white-hot and needs a warm glass material. All 71 lamps also come out at the same 1,316 lumens, though each is meant to vary.
  • Christie's glass hangs upside down in her hand at the club, because the placed copy kept its old rotation setting.
  • Chippy stage two: queue at the till, pay, and take a parcel away.
  • The simulated bin round still needs filming front and side. After the lift, the loader's re-grip pops the bin round to his front.
  • Bring the first furnished interior into Unreal. The other 21 homes have their plans.

← All devlog entries

Watch it get built. All of this goes up on YouTube as it happens - broken animations, buildings hovering a foot off the ground, the lot.

Subscribe on YouTube