Jump to content
Oliver Hope

Ray Cast Debugger

Recommended Posts

Hi all.

I created a small comp to help with debugging ray casts by visualising them. 

RAYCAST DEBUGGING.zip

It can also be found in the workshop under the same name.

20210727152716_1.thumb.jpg.facf6119fac03e051c800d576e3d71d9.jpg

The purple line is an example of a debug for a ray cast.

There are 4 public functions from global storage:
20210814140724_1.jpg.0a26a72509e791b34d7bd05de481f966.jpg

All the visualisation are stored in an array.

The first two functions take the same inputs as a ray cast + an extra parameter for the colour. The first function returns the index where the ray is stored.

Delete all ray casts: self-explanatory.

Delete ray cast: deletes the ray at the given index.

 

An example of how the debug function might be used. NOTE: The debug function does not perform any actual ray casts (doesn't return any hit position or such) it only makes a visualization of a ray cast.

20210814141330_1.thumb.jpg.792bcb9dbd63522a2ad71b7ac18917df.jpg

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×