Skip to content

Commit

Permalink
fix: examples nav mesh debug component
Browse files Browse the repository at this point in the history
  • Loading branch information
isaac-mason committed Feb 1, 2025
1 parent 4450f6c commit cd600c7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/recast-navigation/.storybook/common/debug.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,15 @@ export const Debug = ({
useEffect(() => {
if (!navMesh) return;

const interval = setInterval(() => {
const update = () => {
debugDrawer.clear();
debugDrawer.drawNavMeshPolysWithFlags(navMesh, 1, 0x0000ff);
};

update();

const interval = setInterval(() => {
update();
}, 1000);

return () => {
Expand Down

0 comments on commit cd600c7

Please sign in to comment.