It looks like you're new here. If you want to get involved, click one of these buttons!
Hello, im not very good at programming in unity, and I don't understand how to get an object's data or script if I'm looking at it...
So I wanted to make an ability that allowed you, if you click a button, to teleport to a "teleportation point" positioned around the map, if you are looking at it.
I thought about putting some gameObjects (teleportation point) with a "teleport to" script around the map and put in the player script a raycast. If the raycast from the player finds the "teleport to" script on the teleportation point and you are looking at it, it sets your position to that teleportation point's position (teleporting you there)
I don't know how to access the "teleportation point that you are looking at" 's position... Any ideas how to?