Skip to content

Collision Events

Kevin Mallinson edited this page Nov 14, 2026 · 1 revision

Collision events

A debugging aid for converted levels. Broken collision - a hole in the ground, an invisible wall or ramp, a face flagged unskatable - shows up as the skater suddenly turning round. With [debug] collision_events=1 the game notices each time the skater's velocity reverses on the ground and logs what caused it, so you can skate round a level and read the bad spots from the log afterwards.

What it records

Each event is a collision-event: line in thug2-decomp.log:

  • the cause - the physics path that turned the skater (a wall, the ground check finding no collision under him, a slope...);
  • the face the skater's feeler hit, its collision object and flags;
  • probe lines down and ahead, as the skater's feelers see the world and seeing every face.

The event also shows on screen for 2 seconds, and a screenshot of its frame is saved.

Ordinary turning, braking and quarter pipes aren't counted: only a sudden reversal on the ground.

Turning it on

Key Default What it does
[debug] collision_events 0 1 logs the events
[debug] collision_event_screenshots 1 With it on: a screenshot of each event's frame too

Reading the log

node tools/game/collision_events.ts thug2-decomp.log [--col <level>]

groups the events by level and spot (within about 2 m) into a table - the reasons, the face, its flags and what the probes say (an invisible, trigger or unskatable face, nothing under the next step, an open edge where a piece was dropped, or a turn the player probably made himself). --col <level> also reads the level's converted collision file and finds the collision object and face each spot is on.

Clone this wiki locally