Ask the engine before you write the system
Four days of pursuit bugs, and looking back, every one was the same mistake in a different hat. The suspect's car spawned in front of the player. It spawned facing a wall. It spawned inside another vehicle. It sat still until the player got close, because our own driving logic hadn't started yet. It pulled into traffic and stopped. Each got its own fix, and each fix produced the next bug, because what we were repairing was a system we had written to do a job the game already does.
The game runs police chases. It has a spawner for the vehicles in them, the part that brings them into the world: PreventionSpawnSystem, and the call is RequestChaseVehicle. That call places a car the way the game places its own chase cars: off screen, on the road network, facing the right way, already driving. Every problem in the paragraph above simply stops existing, because none of them was ever a problem for the system built for this.
The suspect now comes out of that call and is handed a PatrolNearbyStrategyRequest, so he circles the district in ordinary traffic before you arrive. No spawn flash: the car never pops into existence in front of you. By the time the dispatch pin lands on your map, the car has been driving those blocks for a minute.
Correction, 2 September. He doesn't circle anything. That request has three fields, and all three are about placement: distance, angle, minimum direct distance. It tells the engine where to put the car, not what to do with it once it's there. I read the name of the class instead of the class itself. The telemetry agrees from the other side: across a hundred and twenty-eight samples of one chase, the patrol behaviour never switched on once. And the player put it more plainly than any log could: the suspect sits there doing nothing until he arrives. The rest of the paragraph above still stands. The placement is still the game's own, and there's still no spawn flash. The car just hasn't been driving those blocks for a minute. It has been parked.
The rule that came out of that week now governs the whole project: before writing new logic, find out who already does it. The engine is thousands of scripts deep, and it has almost certainly done this before you.