How to VISUALIZE RAYCAST in the Unity Editor

Опубликовано: 07 Октябрь 2024
на канале: GDT Solutions
4,088
23

In this video we see how to draw a line that represents a RayCast operation in the Unity Editor, this allows you to debug your code, check that if the RayCast is doing what you need to do and if it hits certain object.
We see the DrawRay function and the DrawLine function, I use the DrawRay function to draw a line when I'm interested in the direction of the line rather in the length. The DrawLine function on the other hand is useful to draw a line between two known positions, for example the origin of the RayCast and the Hit point if there is one.

____________________________________________________________
PORTFOLIO: https://gamedevtraum.com/en/portfolio...
CONTACT:   / gamedevtraum  
LINKEDIN:   / gamedevtraum  
DONATIONS
-You can download one of me free assets for Unity from my ITCH page and leave a donation
-You can donate with the THANKS button on every video
____________________________________________________________