mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2026-01-05 07:20:07 +01:00
Format files using updated file_format.sh
This commit is contained in:
@@ -15,16 +15,16 @@ func _ready():
|
||||
func _process(_delta):
|
||||
if _attachment == null:
|
||||
return
|
||||
|
||||
|
||||
var viewport = get_viewport()
|
||||
if viewport == null:
|
||||
return
|
||||
|
||||
|
||||
var camera = viewport.get_camera()
|
||||
if camera == null:
|
||||
return
|
||||
|
||||
|
||||
var world_pos = world_offset + _attachment.global_transform.origin
|
||||
var screen_pos = camera.unproject_position(world_pos)
|
||||
|
||||
|
||||
rect_position = _pos_offset + screen_pos - 0.5 * rect_size
|
||||
|
||||
Reference in New Issue
Block a user