I am currently working on setting up some world objects for my level editor and am running into a bit of a snag. When I get the hit location from the mouse raycast, I would like to determine what part of the object that the user has hit. I am looking for something that would work for each viewport in my map editor.
I would like to use hit detection change the color of an object when the user mouses over it. 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. I'm skeptical that solution will work though.
