add debug screen
This commit is contained in:
parent
d9c92ccb98
commit
156757d6e4
6 changed files with 93 additions and 1 deletions
13
Scripts/DebugMenu.gd
Normal file
13
Scripts/DebugMenu.gd
Normal file
|
@ -0,0 +1,13 @@
|
|||
extends Control
|
||||
|
||||
func _ready() -> void:
|
||||
$VersionLabel.text = "Pneumatic Plaything v%s" % ProjectSettings.get_setting("application/config/version")
|
||||
$PlatformLabel.text = "%s %s %s" % [OS.get_name(), OS.get_version(), Engine.get_architecture_name()]
|
||||
|
||||
func _process(_delta: float) -> void:
|
||||
if (visible):
|
||||
$FPSLabel.text = "FPS: %.0f" % Engine.get_frames_per_second()
|
||||
var pos = get_node("../").position
|
||||
var angle = get_node("../Camera").rotation_degrees
|
||||
$PositionLabel.text = "X: %.2f, Y: %.2f, Z: %.2f" % [ pos.x, pos.y, pos.z ]
|
||||
$AngleLabel.text = "Pitch: %.2f, Yaw: %.2f" % [ angle.x, angle.y ]
|
Loading…
Add table
Add a link
Reference in a new issue