Raycast ignoring collision, need alternative method

I have a spinning target circle that’s supposed to represent where to aim. The only problem is that the raycast is ignoring collision, and I don’t know an alternative to raycasting.

The spinning circle is at the end of the beam. You can see it no-clipping through the blocks.
https://gyazo.com/949672323bddc4e4f17d7bc67b213c30

So you want that spinning circle to follow the edge of each block?

1 Like

If you want the ray to only be as long as the distance to the first block it hits then change the lenth of the Beam to the Magnitude of the ray from it’s starting point to the raycast result where it hits the target block.

Just a question, but why the arrow and the dashed beam? The arrow length is going half way to the target. Just make the dashed line go the full distance.

Also, since it’s the Scripting Support forum it would help to be able to see the section of code you are dealing with.