Physics Raycast not exposing the Hit result

Brass Contributor

In the Unity Visual Scripting graph the Physics Raycast node doesn't expose the Hit result output so I can get the distance from the origin to the collider. Here's a screenshot to show you what I mean.

UnityVS.png

Any ideas? How do you get the Raycast Hit object?

4 Replies
I have confirmed that some nodes include the `Hit info` as an output and these are missing from the Mesh subset. Could somebody from the dev team explain why we can't use Raycasts and get the hit information?
Whilst I kinda understand not exposing this property in the SDK for security reasons, it would be better if they allowed us to access the Raycast Hit and restrict the options available from those nodes instead. So just allow us the Raycast Hit nodes that give us data like distance but not the target collision object as this could open up to accessing GameObjects they don't want you to meddle with.

Hey @Weald_Spatial! Thanks for bringing this up. This looks like a simple oversight, especially since these overloads are available in non-Mesh Visual Scripting. I'll make a note of it and check if we can expose these overloads in an upcoming release.

Fantastic! Look forward to it.