Create a ray casting and give it a color

How do i create a ray casting and make it visible.

You can’t. A raycast like a line of sight - an invisible line. It’s asking “What can I see if I look from this point to that point”. You can’t see the line of sight, but it can tell you the objects it detects.

To visualise it, you’ll need to draw a line using the same two points that were used for the raycast.

To expound on that, you would first check that the raycast set the Collision X and Y variables, then draw a line (probably using the shape painter object) between your original origin and the collision point.

1 Like