Skip to content

Keep cars and skid-steer vehicles that fall out of the world - #166

Merged
WouterJansen merged 12 commits into
Cosys-Lab:5.8devfrom
jcfurey:fix/vehicle-fell-out-of-world
Oct 5, 2026
Merged

WouterJansen merged 12 commits into
Cosys-Lab:5.8devfrom
jcfurey:fix/vehicle-fell-out-of-world

Conversation

@jcfurey

@jcfurey jcfurey commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

A car or skid-steer vehicle that drops below the level's KillZ is destroyed by the engine, and AirSim's next update or reset() then crashes in PawnSimApi::updateKinematics.

ACarPawn and ASkidVehiclePawn now override FellOutOfWorld: they keep the vehicle, log a warning and move it back to its start pose on the next tick (in Tick, because a teleport inside FellOutOfWorld is overridden by the physics sync).

Tested in HERCULES (a Cosys-AirSim fork) with UE 5.8.3: a car moved 500 m to 11 km below the map returns to its start within 0.3 s, and reset() keeps working. Also built from this tree with UE 5.8.3 (Windows): in Blocks, a car and a skid-steer Husky moved 2 km below the map return to their start, and reset() keeps working. The same code applies to the 5.2.1 branch.

🤖 Generated with Claude Code

BeiZi6 and others added 12 commits September 11, 2026 19:21
Co-authored-by: Cursor <cursoragent@cursor.com>
…-stencil-jansen2022

Register spawnObject actors for instance segmentation and material stencil
A vehicle that drops below the level's KillZ, for example driven off the
edge of the map or pushed through the floor after a collision, is destroyed
by the engine. AirSim keeps using the pawn, so the next sim update or reset
crashes (PawnSimApi::updateKinematics from CarPawnSimApi::updateRenderedState).

CarPawn and SkidVehiclePawn now override FellOutOfWorld to keep the vehicle,
log a warning, and move it back to its start pose on the next tick, with its
velocities zeroed. The teleport happens in Tick because FellOutOfWorld is
called from the physics sync, which overrides a teleport made there.

Found and tested in HERCULES (a fork of Cosys-AirSim) with Unreal Engine
5.8.3: a car teleported 500 m to 11 km below the Blocks map is back at its
start pose within 0.3 s and the simulation and reset() keep working.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JmWqXFCY6vDdpRe4VHoaQX
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants