feat(debug): add player model and octree visualization toggles
- Show Player Model: render the main character GLTF in camera-local space so it stays visible at any pitch. - Show Octree: overlay the collision octree as colored line segments, one wireframe per spatial cell, colored by depth. - Octree Max Depth: cap recursion to keep the scene readable.
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import { create } from "zustand";
|
||||
|
||||
interface DebugVisualsStore {
|
||||
showPlayerModel: boolean;
|
||||
setShowPlayerModel: (value: boolean) => void;
|
||||
showOctree: boolean;
|
||||
setShowOctree: (value: boolean) => void;
|
||||
octreeMaxDepth: number;
|
||||
setOctreeMaxDepth: (value: number) => void;
|
||||
}
|
||||
|
||||
export const useDebugVisualsStore = create<DebugVisualsStore>((set) => ({
|
||||
showPlayerModel: false,
|
||||
setShowPlayerModel: (showPlayerModel) => set({ showPlayerModel }),
|
||||
showOctree: false,
|
||||
setShowOctree: (showOctree) => set({ showOctree }),
|
||||
octreeMaxDepth: 6,
|
||||
setOctreeMaxDepth: (octreeMaxDepth) => set({ octreeMaxDepth }),
|
||||
}));
|
||||
Reference in New Issue
Block a user