i tried to add multiple colliders to my object that have highlight script attached to it so it reacts to mouseover.
first i thought it should be enough to add two spheres at the end and one box collider in the middle instead using expensive mesh collider.
but i was surprised when i got the error that i cannot add the same type of the collider to one object. then i found some topics in the forum and tried to add collider to the empty gameobject as child. but then mouse over function would not work.... so how to deal with this problem?
is it possible to have mouseover script and multiple colliders in the same time.
is the mesh collider expensive after all? if i use low poly count can it be fast as box and sphere colliders? at least not to cause
fps to drop significantly?
When you say that you added an empty gameobject to your original object and attached a collider component to it, where was your "highlight" script (on the original object or on the new object)?
If you have an object you want to behave in a certain way during mouseover, put the script with the effect function on the object. Then create your collider objects as children and put the mouseover script on them. Then when the individual objects are "moused-over" have the mouseover script call the function on the parent object to create the effect.
Seriously, though, unless you are well along in your game and have already hit a performance roadblock, why not use a mesh collider? Optimization is best left for after you have a working game with a problem. Why spend tons of time working around a "problem" that might never actually be one? JMHO...