This is going to be more of a general question to all of that have been using Unity to make your games.
Just out of curiosity, is it common to be utilizing raycasts often to detect various events (from input, to pre-collision detection)?
And what about some of the other issues minor issues that go through the forum, such as being able to render abstract shapes to the GUI (Lines and the like). Some of the ways to accomplish various tasks seem like very complicated ‘workarounds’ or ‘hacks’ in order to get something working properly.
…or am I just totally off base and these sorts of things are typical?
The number one rule of game programming that I live by is “Cheat if you can.” Nothing is going to work exactly like you envision right out of the box, and often the solution is something that feels hackish but works.
For instance, I wanted to get a nice feel to the gravity in my current character controller. Unfortunately, my character drifts off the ground and flaps his arms like a rabid mongoose in common scenarios such as walking down a slight incline. The combination of the character speed and the speed of jumping and falling makes it a bit drifty. So I fire a raycast down and if he’s within 0.25 of the surface, I just stick him directly on the surface with a small exception for when he jumps. Problem gone, solution hacky, but it looks good.
You’ll find these sorts of things with any game engine since they try to be as general as possible and can’t possibly meet every specific need. And you’ll probably still run into them with a 100% custom engine, just because quirks arise.
As far as raycasts specifically, I believe those are pretty common for the situations you mention. They definitely are for detecting 3D objects that you click on (in any engine). Abstract shapes can be difficult, or if you can fake it with an image with an alpha mask, it can be easy. Just depends on what you need to accomplish and if the end result looks right.