new visiblecollision command

This commit is contained in:
2023-02-23 09:50:41 +01:00
parent 97465bf600
commit 6c8433a0e0
2 changed files with 7 additions and 1 deletions

View File

@@ -5,5 +5,6 @@
"noclip": " - Toggles the player collision and lets you walk through walls and world barriers\n",
"stickycamera": " - Toggles the camera mode. Stickycamera follows the player without limits and extra animation\n",
"playername": " <new name> - Renames the player\n",
"reload": " - Reloads the current level (for softlocks or other issues)\n"
"reload": " - Reloads the current level (for softlocks or other issues)\n",
"visiblecollision": " - Toggles if collision shapes hitboxes and hitmarkers are visible. Use 'reload' to see changes!\n"
}

View File

@@ -106,4 +106,9 @@ public partial class console : PopupPanel
textblock.AddText("Your new name is now: " + player_variables.PlayerName + "\n");
}
public void reload() => GetTree().ReloadCurrentScene();
public void visiblecollision()
{
GetTree().DebugCollisionsHint = !GetTree().DebugCollisionsHint;
textblock.AddText("Visible collision shapes and hitmarker now set to: " + GetTree().DebugCollisionsHint + "\nUse 'reload' to see changes!\n");
}
}