StudioService:GizmoRaycast() is missing documentation

This method is useful for plugin development as it works like Workspace:Raycast() except it also allows for handle adornments, making it useful for not needing to have a bunch of MouseEntered connections on HandleAdornments.

So it’d be nice to see it mentioned in plugin documentation, and also have documentation on the method itself.

Page URL: https://create.roblox.com/docs/reference/engine/classes/StudioService#GizmoRaycast

1 Like

Hi @galmeowing ,
Could you please post a code example or describe your usage of this method? I’d like to learn about your context so I can include/cite a solid and practical example alongside the docs.

Thanks,
IgnisRBX

On further exploration, this method doesn’t work with HandleAdornment or adornments that inherit from it (if you have a case that shows otherwise, please show how). This method only works with internal adornments like Attachment and Constraint visualizations, so it’s currently of limited use to creators, although we’ll hopefully extend this method to work more broadly in the future. In the meantime, I’ll set this request to “on hold”. Thanks for your request!

Take care,
IgnisRBX

Oh so that’s why I ended up thinking it didn’t work when I tried using it.

I’ve had to resort to a workaround to be able to know when a user clicks in the viewport using GuiState as I want users to be able to use the studio draggers whilst using my plugin (I’m also using a jank method of detecting if a user is using the studio draggers). As enabling exclusive mouse for the plugin will deactivate the studio draggers.
So I can’t use MouseEntered on HandleAdornment because it requires having exclusive mouse controls, and also the fact that it’d scale really poorly as my plugin will create 100s of handle adornments for visualizing node maps and that also means 100s of MouseEntered connections.

Although I don’t have this issue anymore, as I’ve pivoted to using parts for nodes instead of doing some fancy codegen for representing node graphs as buffers. So I can just use regular raycasts now.

Hi @galmeowing ,
Since GizmoRaycast() is of very limited (if any) use to creators, I’ve opted to hide it from the documentation. If/when we resurface this method to work more broadly (i.e. on HandleAdornments), we’ll re-document it properly. Thanks for bringing this to our attention.

Take care,
IgnisRBX

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.