- Home /
Possible to make OnMouseOver ignore triggers?
I have a object that has a sphere collider on it and its Is Trigger box is enabled. And I have a script attached to that object using the function OnMouseOver, and the trigger and OnMouseOVer are colliding and I don't want them to. Is it possible to make OnMouseOver ignore the trigger and only occur when moused over the actual GameObject?
The only thing I found from ignoring collision is with the physics component. $$anonymous$$ay help. http://docs.unity3d.com/Documentation/ScriptReference/30_search.html?q=IgnoreCollision
"trigger and On$$anonymous$$ouseOVer are colliding"
this makes no sense
why don't you elaborate, since it is very unclear what your actual setup is.
On$$anonymous$$ouseOver requires a collider on the object, that's what it uses to check for. If you are suggesting that you only want the actual mesh of your model to work with On$$anonymous$$ouseOver, you may want to give it a mesh collider ins$$anonymous$$d. you could create an empty child or parent object to give the sphere/trigger if you like
try posting the relevant code
Yes it is possible
I was just searching for an answer and found out how:
you set the camera culling mask
and you remove anything you want to ignore.
OFC you won't see those objects either so you'll need to give graphics to children propably, ...
well triggers are usually not graphics anyway, ...