Interaction rework
This commit is contained in:
parent
345acc8079
commit
72bea66082
11 changed files with 90 additions and 23 deletions
|
|
@ -5,9 +5,9 @@ extends Button
|
|||
|
||||
func _on_button_down() -> void:
|
||||
var scene = draggable.scene_to_spawn.instantiate()
|
||||
get_tree().current_scene.add_child(scene)
|
||||
if scene is DraggableObject:
|
||||
scene.dragged = true
|
||||
scene.mouse_in = true
|
||||
get_tree().current_scene.add_child(scene)
|
||||
var camera = get_viewport().get_camera_3d()
|
||||
scene.global_position = camera.project_position(get_global_mouse_position(),1.8)
|
||||
scene.global_position = camera.plane_position
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue