added building mode for cart

This commit is contained in:
Nikolai Fesenko
2025-08-10 20:38:16 +02:00
parent dc6f0d2907
commit 83095a0b8d
25 changed files with 3806 additions and 244 deletions

View File

@@ -1,11 +1,16 @@
extends Camera3D
@export var rayLength: float
func getGlobalMousePosition() -> Vector3:
var debugLabel
func _ready() -> void:
debugLabel = $DebugLabel1
func getGlobalRayTargetObject():
var space = get_world_3d().direct_space_state
var mousePos = get_viewport().get_mouse_position()
var from = self.project_ray_origin(mousePos)
var to = from + self.project_ray_normal(mousePos) * rayLength
var query = PhysicsRayQueryParameters3D.create(from,to)
var collison = space.intersect_ray(query)
return collison.position
return collison