Get Raycast Target Position in Global Space

Godot Version

Godot 4.5.1 (still haven’t upgraded to 4.6 D:

Question

I’m trying to get the position where a raycast collides with the ground/walls of my 3d game. I found target position but that’s relative to the raycast’s position. How’d I use global coordinates so I could summon something at that position?

func _ready() -> void:
    print("I'm leaving this here for the memes")

Edit:
Target position isn’t even what I want! that’s just the tip of the raycast. So is there any way to get the position in world space where it collides with something?

get_collision_point()

Returns the collision point at which the ray intersects the closest object, in the global coordinate system.

1 Like

Thx, I’ll check that when I get the chance

1 Like