Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: noxqs on July 06, 2013, 11:40:32 AM

Title: can Mouse Pick ignore trigger colliders ?[SOLVED]
Post by: noxqs on July 06, 2013, 11:40:32 AM
I have a gameobject with mesh renderer and a sphere collider set to trigger.
I would like to get a positive hit when I click on the mesh, not on the sphere trigger collider.
Is there any way to ignore the trigger collider in the mouse pick ?
I don't want to seperate the collider and mesh to different objects.

Regards,
NoXQS.
Title: Re: can Mouse Pick ignore trigger colliders ?
Post by: noxqs on July 06, 2013, 12:06:52 PM
I get the feeling mouse picks only work on objects with (mesh) colliders set up as no trigger colliders.
Since you can only apply one collider per object (unless as child, which I try to avoid), is there anyway to mouse pick the object and ignore the (trigger) collider ?

There is this option in physics settings to switch off Raycast Hits Triggers, but then it doesn't register the mouse pick at all.
Title: Re: can Mouse Pick ignore trigger colliders ?
Post by: noxqs on July 06, 2013, 12:23:58 PM
Sorry Jean, I am going to solve my own mystery again  ;D

I was wrong with not being able to have more than one collider per object. I just didn't pay attention to the other options in the replace collider message window.

Anyway, for those who are interested, in my cast I have a tower that uses a trigger sphere to be aware of enemies entering the trigger sphere collider.
I also wanted to be able to target the tower with mouse pick but not pick the trigger sphere collider.

The solution was to
- disable the Raycast Hits Triggers option in physics settings
- add a non trigger collider to your object (mesh or basic shape collider)

And now it works like a charm, perfect.
Title: Re: can Mouse Pick ignore trigger colliders ?[SOLVED]
Post by: jeanfabre on July 09, 2013, 01:37:20 AM
Perfect  ;)  :P I like solved problems!