godot_experiments/experiments/test_3d.gd

12 lines
307 B
GDScript3
Raw Normal View History

2024-04-19 13:15:35 +08:00
extends Node3D
@onready var camera = $Camera3D
#func _ready():
#var sp = get_screen_position($LCB)
#print("3D物体在屏幕上的位置: ", sp)
#
#func get_screen_position(mesh_instance):
#var global_position = mesh_instance.global_transform.origin
#return camera.unproject_position(global_position)