HitboxWireframeVisualizer

版本 v1.0.0·更新於 2026-03-03

Overlay wireframe hitboxes for nearby objects (enemies, players, room modules, items) and optionally make the underlying models transparent.近距離の敵/プレイヤー/部屋モジュール/アイテムの當たり判定を表示

模組介紹 作者原文

HitboxWireframeVisualizer

Overview

HitboxWireframeVisualizer draws a wireframe overlay for nearby hitboxes (colliders) in real time.

It supports enemies, players, room modules, and items, and can optionally make the underlying models transparent so small or tight colliders remain visible.

Features

  • Wireframe hitbox overlay for nearby colliders
  • BoxCollider / SphereCollider / CapsuleCollider
  • MeshCollider optional (drawn as bounds box)
  • Category filters (toggle per genre)
  • Enemy / Player / RoomModule / Item
  • Color rules
  • Triggers use a dedicated color
  • Non-triggers use a layer-name based color map
  • Optional translucent fill rendering
  • Optional grid sample points inside the selected/nearest shape (heavy)
  • Optional model transparency
  • Per-genre alpha percent (0–100)
  • Uses MaterialPropertyBlock by default to avoid material instancing
  • Config hot-reload
  • Automatically reloads when the config file is modified
  • Physics trace (optional)
  • Visualize Raycast / OverlapBox / OverlapSphere calls via Harmony patches
  • Target lock and export
  • Target lock toggles a “locked root” selection
  • Export selected target collider summary as JSON to clipboard

Default Keys

  • F1: Toggle mod enable
  • F4: Toggle target lock
  • F5: Toggle draw-through-walls (ZTestAlways)
  • F6: Toggle fill mode
  • F7: Toggle grid sampling
  • F8: Toggle physics trace
  • F9: Toggle freeze (stop collecting, keep drawing)
  • F10: Export selection JSON to clipboard

Configuration

Config file is generated by BepInEx after first launch.

Key settings:

  • Genres
  • ShowEnemy / ShowPlayer / ShowRoomModule / ShowItem
  • Transparency
  • AlphaEnemyPct / AlphaPlayerPct / AlphaRoomModulePct / AlphaItemPct (0–100)
  • EnableModelTransparency
  • UseMaterialPropertyBlock
  • ForceFallbackShader
  • Performance / stability
  • MaxCollidersPerCollect
  • EnemyPriority
  • CacheExpireFrames
  • NearestFirst
  • OverlapBufferMax
  • EnemyLayerNameFallback
  • Rendering
  • ZTestAlways
  • FillMode / FillAlpha
  • ThickWireEnable (heavy), WireWidthWorld, WireWidthDistanceScale
  • SphereSegments
  • Debug/extra
  • ShowPhysicsTrace
  • GridSampleEnable (heavy), GridPitchMeters, GridMaxPoints

Technical Details

  • Collection pipeline
  • Uses Physics.OverlapSphereNonAlloc centered on the current camera position
  • Classifies colliders into enemy-like and others, optionally sorting by distance to prefer nearby objects
  • Applies a per-collect processing cap (MaxCollidersPerCollect) to control CPU cost
  • Ownership and genre resolution
  • Attempts to resolve a logical “root” GameObject for each collider
  • Prioritizes EnemyParent/Enemy for enemy detection
  • Supports fallback “Enemy” layer-name classification if enabled
  • Rendering
  • Uses GL.LINES for wireframes, and optional triangle fill approximation
  • Uses Hidden/Internal-Colored (or a fallback shader) for overlay materials
  • Transparency
  • Uses MaterialPropertyBlock to change _Color/_BaseColor alpha without duplicating materials
  • Tracks per-root alpha and only reapplies MPB when alpha changes
  • Restores original sharedMaterials and property blocks when targets leave the visible set
  • Config hot reload
  • Polls config file timestamp and calls Config.Reload() on change
  • Physics trace
  • Optional Harmony patches to log/visualize Physics Raycast/Overlap calls in-world

Installation

  • Install BepInEx for R.E.P.O.
  • Place the mod DLL into:
  • BepInEx/plugins/
  • Launch the game once to generate the config:
  • BepInEx/config/REPOJP.HitboxWireframeVisualizer.cfg
  • Edit the config and save to apply changes (auto-reload)

Notes

  • Enabling ThickWireEnable, GridSampleEnable, or MeshCollider rendering can significantly increase CPU/GPU load
  • If you only need enemy hitboxes, disable other genres to reduce overhead
  • This mod is intended as a debugging/visualization tool

HitboxWireframeVisualizer

概要

HitboxWireframeVisualizer は、近距離に存在する當たり判定をリアルタイムにワイヤーフレームで表示します。

敵/プレイヤー/部屋モジュール/アイテムに対応し、當たり判定が小さい場合でも見えるように対象モデルを透明化することもできます

機能

  • 近距離Colliderのワイヤーフレーム表示

安裝與使用 安裝:BepInEx 外掛

  1. 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
  2. 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
  3. 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
  4. 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。

帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。

前置依賴

下面這些內容需要先安裝,否則該模組不會生效:

BepInEx-BepInExPack

檔案與校驗

檔案名稱
HitboxWireframeVisualizer-1.0.0.zip
檔案大小
143.2 KiB