I am trying to make a basic FPS game for a game jam that I am preparing for, and I'm currently implementing the ability to shoot. My method of doing it is having a ray from the characters line of sight shoot off very far into the distance (image 1). When I attempt to print what the ray collides with, it works, unless there is something behind the enemy I'm trying to have it collide with.
When I click on the enemy when there is nothing but sky behind it, it prints that I am hitting the enemy (image 2, look at console output).
If I click when a static body is behind the enemy, it prints the StaticBody3D instead of the enemy. (image 3, look at console output)
Why wouldn't get_collider() be printing the enemy, but the thing behind it?
Let me know if this is too ambiguous of a question, I can add more details.