Raycast, mouse tracking in 2.5 D

Godot Version


Can you give more Information on what exactly you need help with?

I am wondering if there is a way to have raycast stop at a certain point so it doesn’t go for forever. And wondering if gridmap can be used for this. I am trying to track mouse movement for aiming

the raycast has a target_position property, but im not sure if that means in stops there. When something collides with your raycast you can check if the distance is greater then a certain threshhold and only if its smaller execute your code

I realised I can just put an invisible wall and now it works.

1 Like