Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix physics picking in Gui in 3D Demo #1139

Merged
merged 2 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions viewport/gui_in_3d/gui_3d.gd
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,13 @@ func _process(_delta: float) -> void:

func _mouse_entered_area() -> void:
is_mouse_inside = true
# Notify the viewport, that the mouse is now hovering it.
node_viewport.notification(NOTIFICATION_VP_MOUSE_ENTER)


func _mouse_exited_area() -> void:
# Notify the viewport, that the mouse is no longer hovering it.
node_viewport.notification(NOTIFICATION_VP_MOUSE_EXIT)
is_mouse_inside = false


Expand Down
1 change: 0 additions & 1 deletion viewport/gui_in_3d/gui_panel_3d.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ grow_horizontal = 0
grow_vertical = 0
item_count = 3
popup/item_0/text = "Item 0"
popup/item_0/id = 0
popup/item_1/text = "Item 1"
popup/item_1/id = 1
popup/item_2/text = "Item 2"
Expand Down
2 changes: 1 addition & 1 deletion viewport/gui_in_3d/project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ config/description="A demo showing a GUI instanced within a 3D scene using viewp
as well as forwarding mouse and keyboard input to the GUI."
config/tags=PackedStringArray("3d", "demo", "gui", "official")
run/main_scene="res://gui_in_3d.tscn"
config/features=PackedStringArray("4.2")
config/features=PackedStringArray("4.3")
config/icon="res://icon.webp"

[debug]
Expand Down