I am currently working on setting up some gizmos for my level editor and am running into a bit of a snag and am not really sure how to proceed. When I get the hit location from the raycast, I would like to determine what part of the gizmo that the user has hit. I am looking for something that would work for each viewport. I believe it would be possible, just not sure how to pull it off.
What I am lookin for is when the user mouses over the gizmo it would change color in that area. For instance, if the user mouses over the x axis (red arrow) it would turn from red to white. It doesn’t have to be pixel perfect but I would like to find a single solution that would work in all viewports.
I was thinking that after I get the hit location, I could transform the hit location to match the inverse of the rotation of the camera and perform the checks from there. However, I don’t think that is correct and am not sure what steps I need to do from there.
Thank you,
Chaz H