Ok so i have an enemy and when i mouse over it the targetting reticule animates but once i add another trigger collider (Larger sphere which i use to trigger the enemy’s ai states) the OnMouseOver function doesnt work. (‘:?’)
(now this next bit i know little about)
would using overlap sphere instead of the sphere collider solve this problem or do i still require a sphere collider?
:?
Well the larger collider is hindering the other trigger to… eh… trigger. You should only use one collider per object. Use logic in script to differentiate the two uses.
As for OverlapSphere this is a method to check for colliders around the object and will not work for your use as far as I can see.
Ah I see. Well the overlap sphere would do the trick then, but I’m not sure how expensive it is. I suppose it’s your best bet if the radius in which to check for surrounding object is bigger than you want your collider to be.
As for the colliders I still think the outermost collider(trigger or non trigger) consumes the ray cast in the OnMouseOver method. I don’t think it is smart to have a collider inside another, even if one is a trigger and the other one is not.