Raycasting for Spatial Understanding
Overview
Hello! I know that there's already a way to shoot raycasts in Spatial Understanding. But that takes more lines of code than a normal unity Physics.Raycast(). So I have created a class, "Physics_SU", that works the same way that Unity does it: in one line.
I've also made a serialized class that acts like a layerMask called a surfaceMask that can ignore different types of surfaces. It can also have an out parameter that takes in a type RaycastHit_SU struct that contains hit position, distance and surface type.
Again, I'm not trying to reinvent the wheel but more of making it easier to use? HAHA Anyway, hope it helps someone out coz I couldn't understand Spatial Understanding for the longest time and this should be familiar to long time unity users. Sorry I don't know where to post this. If there's a better place to do this please let me know!
At the moment it only can do raycasts but I'm trying to figure out how to have Sphere/BoxCasts as well. If anyone has any ideas please do contribute! I need the help :p
Thanks all! (Again, sorry if I shouldn't be posting this here)
Unity Editor Version
2017.1.2
Mixed Reality Toolkit Release Version
2017.1.2 (and probably everything else that has spatial understanding) sorry I haven't tested it
Please do feel free to issue a PR and add this functionality to the existing code base.
Closing issues older than 180 days. If this is still an issue, please reactivate with recent information.