Skip to content

Add Lara collision debug visualization#5

Open
walkawayy wants to merge 2 commits intodevelopfrom
codex/add-debug-mode-for-lara-collision-visualization-jkf4pf
Open

Add Lara collision debug visualization#5
walkawayy wants to merge 2 commits intodevelopfrom
codex/add-debug-mode-for-lara-collision-visualization-jkf4pf

Conversation

@walkawayy
Copy link
Copy Markdown
Owner

Motivation

  • Provide a debug visualization for Lara's runtime collision bounds similar to the existing debug.enable_debug_cuboids to make collision/radius/height issues easier to inspect.
  • Reuse existing cuboid rendering primitives so the visualization matches other debug overlays.

Description

  • Add a new config flag debug.enable_debug_lara_collision in src/trx/config/map.def and expose it through CONFIG.debug in src/trx/config/types.h and the debug console command registry in src/trx/game/console/cmd/debug.c.
  • Extend LARA_INFO with debug_collision_radius and debug_collision_height in src/trx/game/lara/types.h to hold the collision metrics used for visualization.
  • Track and update those debug values from collision handling paths by adding M_UpdateDebugCollision and calls in src/trx/game/lara/control.c for above-water, underwater, surface, and vehicle-control branches.
  • Render the collision bounds during Lara draw passes by adding M_DrawCollisionBounds to src/trx/game/lara/draw.c and calling it when is_lara and g_Config.debug.enable_debug_lara_collision are enabled, using the existing Output_DrawCuboid helper.

Testing

  • No automated tests were run as part of this change.

Codex Task

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 16, 2026

@walkawayy walkawayy force-pushed the codex/add-debug-mode-for-lara-collision-visualization-jkf4pf branch from 710321e to 742734b Compare January 17, 2026 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant