Skip to content

Commit 5f0e0ce

Browse files
authored
Improve GUI in 3D demo (#1140)
- Increase physics ticks per second to 120, so that UI interactions feel smoother and have lower input lag. This happens since input is governed by the physics tick due to the use of physics picking. - Add a placeholder to the LineEdit and select a default option in the OptionButton.
1 parent 6f44371 commit 5f0e0ce

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

viewport/gui_in_3d/gui_panel_3d.tscn

+3-1
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,9 @@ horizontal_alignment = 1
5959
layout_mode = 2
6060
text = "A button!"
6161

62-
[node name="TextEdit" type="LineEdit" parent="SubViewport/GUI/Panel/VBoxContainer"]
62+
[node name="LineEdit" type="LineEdit" parent="SubViewport/GUI/Panel/VBoxContainer"]
6363
layout_mode = 2
64+
placeholder_text = "Enter text here..."
6465

6566
[node name="HSlider" type="HSlider" parent="SubViewport/GUI/Panel/VBoxContainer"]
6667
layout_mode = 2
@@ -119,6 +120,7 @@ offset_right = -39.0
119120
offset_bottom = -147.0
120121
grow_horizontal = 0
121122
grow_vertical = 0
123+
selected = 0
122124
item_count = 3
123125
popup/item_0/text = "Item 0"
124126
popup/item_1/text = "Item 1"

viewport/gui_in_3d/project.godot

+4
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ theme/default_theme_scale=2.0
3030

3131
3d_physics/layer_2="Control"
3232

33+
[physics]
34+
35+
common/physics_ticks_per_second=120
36+
3337
[rendering]
3438

3539
renderer/rendering_method="gl_compatibility"

0 commit comments

Comments
 (0)