Second Chance GazetteDevlogToken Use

Line of Sight

unreal-enginemetahumannpc-routinesblueprintline-traceout-of-memoryhairdresserpolicedartsclaude-codegta-6

Help us out, duck

Angela sits on a square of cardboard outside Boss Man's, the corner shop on Radworth Road, with a hat by her feet. She asks the people walking past for change. Some of them give it. If the player stops, she asks him too: help us out, duck, just enough for a sandwich. He can give her something, ask how she is getting on, or say sorry, not today.

A woman in a maroon top and grey jeans sits on a square of cardboard against the brick front of a corner shop, one hand held out, a dark hat on the slab by her feet and the shop door open beside her.
Angela at her pitch by the shop door. The hat is on the door side, which is the wrong side, and that was one of the day's jobs.

It was a Tuesday, which meant college for James, and the gym at lunch if the day allowed it. The game carried on at home without him. The agent, Claude Code Opus 5.5, ran in several sessions taking turns on the one copy of the editor, and James answered their questions in the gaps. By the end of the day Angela had been rebuilt seven times and tested seven times, and the last thing anyone did to her was make her notice when you leave.

Each of those fixes was small. None of them was the one the agent expected to be hard.

Floating

The first test of the morning was a good one, on the numbers. Five people were asked for money in about twenty minutes of game time, three of them gave, and the coins landed flat in the hat and stayed there. The hat went from 85p to £4.05.

Then the agent looked at who had given. Three of the five people Angela had asked were delivery riders on e-bikes. They counted as townspeople as far as her code was concerned, so she asked them, and two of them gave without stopping. The coin flew into the hat from a bike that was already past her. The one ordinary resident who gave stopped a metre and a half to her side, facing away from her, and the coin dropped out of the middle of his body rather than his hand.

A man in a cream jumper stands on the shop's doorstep slab beside the sitting woman, facing away from her towards the shop window, with the hat on the slab behind him.
The one resident who gave. He stopped on the wrong side of her, facing the shop window.

The riders were the easy part. They are still asked, because a person begging does not check first, but they never give. That went in with the next build.

At about one o'clock James sent one line. Angela and the cardboard is floating.

He was right, and the agent measured how right. The cardboard and the hat sat 4.4 centimetres above the pavement, because the script that placed them added 4 centimetres for luck. Angela's body sat 6.4 centimetres up, and that was three things stacked on top of each other: a 2.2 centimetre gap the engine leaves under every character's capsule, 2 centimetres from the town's own foot-height correction, and another 2.2 on top. Her hips were 20 centimetres off the slab when the sitting animation expects ten.

A camera at pavement level looks up at the same woman in her sitting pose, with a clear gap of light between her and the slab and her hat hovering beside her trainer.
Angela from the kerb at pavement height. There is daylight under her.

The fix was to push her body down by 9 centimetres while she is begging, added on top of whatever else is moving her, and taken back off when she stands. The hat and the cardboard now trace down to the pavement and sit on whatever they hit, with their collision off so nobody trips on them. Later he added a rule of his own: she should never skip begging when someone walks past.

The next test, which would have checked it, ended when the graphics card hung. The editor's viewport was nearly 4K, the card has 8 GB, and the driver reported 7 GB in use against 6.3 available. The retest at five passed. Hips 11.5 centimetres up, cardboard and hat at exactly zero.

The wrong side of the door

Not long after, James sent a still back. A passer-by was standing on Angela's hat.

The hat had started on her left and been moved to her right in the morning, because on the left it hung off the edge of the slab over the grass. Her right is the door. Everybody going into the shop walked through it. So the agent wrote a small test that looks at the ground on her left and only puts the hat there if the slab is level. It ran in the evening and the hat went to the right again.

The test was right. Angela sits on the corner of the slab, and on her left the trace landed on the grass 22 centimetres below it. The logic will stay as it is. Where she sits is what needs moving.

Out of sight

At seven James asked for the thing the rest of the evening went on. When the player walks away from Angela, into the shop, the chat should go a couple of seconds after he loses sight of her. Until then it sat on the screen until he was six metres off, whatever was in between.

The first version used a line trace: a straight line from the player to Angela, and if anything solid was in the way, she was out of sight. The agent built it, the editor ran out of memory halfway through saving it, and the rest was built on a fresh editor just before eight. In the test, every chat opened and closed in the same frame. The script said she was seen. The game said she never was. The agent ran its own trace along the same line and got a clear view, which meant the trace was fine and something in the way it had been wired into the Blueprint was not. It did not stop to find out which.

The second version asked the engine instead. Unreal has a check called WasActorRecentlyRendered, which answers whether something was drawn on screen in the last quarter of a second. It is what a lot of tutorials suggest for this. The chat opened and stayed open, which was progress. Then the agent walked into the shop and turned round so that Angela was 126 degrees behind the camera, and the chat stayed open for two minutes.

The inside of a corner shop, white shelves and drinks fridges, with Angela's chat box still on screen in the bottom right asking for the price of a sandwich.
Inside Boss Man's with Angela well behind the camera. She is still asking for the price of a sandwich.

Every part of her body said it had been drawn. The face, the body, each piece of clothing, even a layer of dirt that casts no shadow. The agent switched shadows off and they still said it. Her hair, which is a different kind of object, was the only part of her telling the truth: false inside the shop, true when the camera faced her.

The third version is plain geometry. Angela is in sight if she is inside a 60-degree cone in front of the camera and a line trace from the camera to her chest hits nothing but her. Facing her at three metres, the chat opened and stayed open for 46 seconds. With the camera turned away, it closed two seconds later, and opened again when he faced her. From inside the shop, looking straight at her through the wall, the cone passed, the trace hit brick, and the chat closed two seconds after that. She went back to asking passers-by. That was half nine.

The game's own view of the woman sitting outside the shop, with a chat box offering three replies: give her something, ask how she is getting on, or say sorry, not today.
The finished version, in the game's own view. Help us out, duck.

Rockstar will have a department for the people on the street in GTA 6. Angela had a Tuesday, and by the end of it she knew when you had walked off.

Snip

The hairdresser's had been going all day on the other side of the town. Agnieszka, the new stylist at Fringe Benefits, had been built the night before. In the morning the cape on one of her customers rose about 40 centimetres over her head. The cape was put on at every step of the haircut, and putting a thing back on the socket it is already attached to does not reset it. A small lift added each time stacked up, twenty times over. It now goes on once.

James watched a cut himself at about two. The animation looked OK, he said, but the hair on the floor was a long way from the chair and looked like a cowpat. And he could not see any snipping. Her arm moved and the scissors did not.

From above and behind, a stylist with a dark bob and grey jumper works at the back of a seated customer's head, the customer covered in a black cape, in a salon with tall windows.
Agnieszka at work. The scissors open and close now. Her hands still work beside the head rather than behind it.

The scissors now open and close, and the clippings are fine strands scattered round the chair instead of one brown heap. At half three James said he could see the snipping. The first scatter of clippings was there too, and invisible, because it landed inside a ring 12 to 38 centimetres from the chair's centre, and the chair's base plate is wider than that. The ring now starts at 36. Terry, the barber next door, got the same fixes in the same pass.

A low shot of a barber's chair base and the feet of the barber and the customer, with a small scatter of fine ginger hair clippings on the grey floor.
The barber's chair from the floor. Hair that reads as hair.

Agnieszka's hands still work about 20 centimetres out beside her customer's head, not round the back of it. The cutting animation was made for Terry, and his customers' heads are in a different place.

A smile for the custody officer

The officers' new vest came from Fab, the free download James had cleared first thing. It was fitted to the officer's chest by lunchtime and in his Blueprint by half four. On the first try it read charcoal rather than black, and the tint came down to 0.45. James looked at it and said the new stab vest looked great, and asked for high-quality shots of him in the game.

A police officer in a custodian helmet stands behind a wooden counter in a white shirt and a black vest marked POLICE, with a radio clipped to the left of his chest.
The custody officer behind his desk at the police station, in the new vest.

Getting those took most of the next two hours. At the high settings the editor ran the game at half a frame per second, and the plugin the agent drives it through timed out between calls. The usual console command for scalability did nothing at all in that editor, and only setting each quality group by hand moved them. The game's own intro holds a new player in custody and ignores any attempt to move him, so the agent shot the officer from where it was being held.

A narrow custody room with a blue cell door on the left and the officer in his vest behind a blue-fronted desk, a window above him.
The custody room. The cell door is on the left.

James liked the outfit. He asked for a slight smile, to make him look less mean, and a shot of him walking into the cell with the door behind him. The smile came from Boss Man's own face animation, which already existed, and went on at ten to seven.

Darts and windmills

Two more threads ran into the night.

In the Slag & Slurry, Edward has 60 things to say during a game of darts now, from offering a game to leaving the scores up when you walk off. They are subtitles for now, because James has put the recordings back. In the first test, one of them was covered by the next caption before anybody could read it. Late on, his throw was rebuilt so that the dart is in his hand before he throws it, flies on a real arc for a third of a second, and wobbles when it lands. It was saved at twenty to ten. The check that read back all 70 of its functions took the editor down six minutes later. It was three hours old and had used 82.6 GB of memory.

And the town's election got its promises. Whoever wins, the main promise is meant to happen in the game. If it is the candidate offering a wind farm, the turbines go up on the hills to the south-east, lifted by cranes, and the player's electricity bill goes to nothing. James wanted them seen on the walk home to the pub. The agent worked out from the height map that turbines with a 150-metre tip, three kilometres out, would be visible from 16 of the 17 places it checked on Radworth. That is the plan. There are no turbines in the game yet, and no crane.

The fault

WasActorRecentlyRendered always true for an off-screen MetaHuman in Unreal Engine 5.8

An NPC chat meant to close when the player loses sight of her stayed open with her 126 degrees behind the camera and a wall in between, for over two minutes.

  • Wrong tool: WasActorRecentlyRendered(Body, 0.25) on the MetaHuman body. Every SkeletalMeshComponent on her (Body, Face, every garment, a dirt layer with cast_shadow off) read was_recently_rendered True out of the frustum, and still did with ShowFlag.DynamicShadows 0. No scene capture was active. Only her Hair groom component tracked the view correctly.
  • Before that: a Visibility line trace version opened and ended the chat in the same frame. The seen flag never set, though a trace on the same line from Python was clear. The compiled graph did not match the script. Not pinned down; replaced.

The fix

A view cone plus a line trace, with a grace period

In sight = Normalize(target + 60 cm - camera location) . camera forward > 0.5 (about 60 degrees) and a Visibility trace from the camera to her that is clear or hits only her body, her citizen actor or the pawn. The chat ends 2 s after the last time she was in sight; losing sight re-arms her auto-open.

PIE: back turned (dot -0.94) closed it after about 2 s; inside the shop facing her through the wall, the cone passed, the trace hit the wall, and it closed after 2 s.

The guard: before trusting a render-based visibility check, turn the camera away and read it.

The fault

Seated NPC floats above the pavement in Unreal Engine 5.8

A sitting MetaHuman's body root sat 6.4 cm above the slab, hips 20.5 cm (the clip expects about 10), and her props 4.4 cm.

  • Cause, stacked: the capsule's floor gap (2.2 cm), a project foot-height correction (2.0 cm), and 2.2 cm more; the props' placer added a flat 4 cm.
  • Also: e-bike riders passed the NPC cast and dropped coins from a moving bike, and a giver stepped to the wrong side, facing away.

The fix

Lower the body additively, trace the props down

While she is seated, the body's relative Z goes down 9 cm with AddRelativeLocation, tracked and taken back on standing, so it stacks with the foot-height correction instead of fighting it. Props trace to the ground and lose collision. Result: root -2.6, hips +11.5, card and hat 0.0. Riders are asked but never give.

The fault

Unknown input pin InFloat on ToString(Float) and r.SkyAO Failed to find console variable

  • A graph DSL line using :InFloat on the float-to-string node failed in 5.8 and left that graph partial. The pin is InDouble.
  • r.SkyAO 0 prints Failed to find console variable, so every test that set it had changed nothing. The cvar is r.VolumetricCloud.SkyAO.

The fault

Editor out of memory: paging file too small at 80 GB commit

The editor crashed mid-build with Ran out of memory... paging file too small and 80 GB of virtual memory used, after a long day on the main map. A second editor, three hours old, went at 82.6 GB during a read-back of 70 Blueprint graphs.

The fix

Fresh editor, resumable builds, named read-backs

Build scripts back up first, save after each function and can be re-run, so the crash cost one re-run on a fresh editor. Full read-backs run only on a fresh editor, or are given the names of the graphs that changed.

The fault

Hairdresser's cape climbs over the customer's head

Re-attaching to the same socket does not re-snap, so an AddWorldOffset lift on every step of the cut stacked about 20 times by 2 cm. Fixed with a cape-on flag so it goes on once. Floor clippings were invisible because their ring (12-38 cm) was under the chair's base plate; now 36-62 cm.

The kit

ToolWhy this one
Claude Code Projects (beta)several Opus 5.5 sessions sharing one editor through the day, one at a time
Monolith MCPdrove the PIE tests and the console commands
Fabthe free battle vest

Plain English

TermWhat it means
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.
MetaHumanEpic's system for realistic human characters - face, body, hair and clothing, ready to animate. Every named person in the game is one.
traceFiring an invisible line into the world to find out what it hits - used for "what is under this object" and "what is the player looking at".
view coneThe wedge in front of the camera that counts as what the player is looking at, worked out from the angle between the camera's direction and the thing.
WasActorRecentlyRenderedAn engine check that asks whether a thing was drawn in the last fraction of a second; on some characters it says yes while they are well off screen.
frustum cullingNot drawing things outside the camera's view.
groomHair built as individual strands rather than as a textured surface. Looks far better, costs far more to render.
skeletal meshA 3D model with a skeleton inside it, so it can bend and animate. People and animals are skeletal meshes.
socketA named attachment point on a model - a hand for holding a bag, a roof for a light.
OOMRunning out of memory, at which point the program stops.
DSLA compact text format for writing Blueprint logic, so an agent can author graphs as text instead of dragging boxes with a mouse.
console variableA named engine setting that can be changed while the game runs, by typing it into the console, or fixed in a config file.
BlueprintUnreal's visual scripting. Logic built by wiring boxes together with lines instead of typing code. This whole game is built in it.
FabEpic's marketplace for ready-made game assets - models, materials, characters, clothing. Buying a garment and refitting it is how almost everyone in this game got dressed.

Things we still need to fix tomorrow:

  • Move Angela's pitch off the corner of the slab, so the hat can go on her left, away from the door.
  • A resident giving to her from the front, reaching with a hand, and her head turning to the person she asks.
  • Key Agnieszka's own cutting clip so her hands work round the back of the head.
  • The custody officer's smile in the game, and the shot of him at the cell door with the meal.
  • Edward's new throw in PIE, and his lines staying up long enough to read.
  • The wind farm, the half fares and the flood wall, one for each way the election can go.

← 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