playMaker

Author Topic: can Mouse Pick ignore trigger colliders ?[SOLVED]  (Read 3783 times)

noxqs

  • Playmaker Newbie
  • *
  • Posts: 7
can Mouse Pick ignore trigger colliders ?[SOLVED]
« on: July 06, 2013, 02:40:32 PM »
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.
« Last Edit: July 09, 2013, 04:36:40 AM by jeanfabre »

noxqs

  • Playmaker Newbie
  • *
  • Posts: 7
Re: can Mouse Pick ignore trigger colliders ?
« Reply #1 on: July 06, 2013, 03: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.

noxqs

  • Playmaker Newbie
  • *
  • Posts: 7
Re: can Mouse Pick ignore trigger colliders ?
« Reply #2 on: July 06, 2013, 03: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.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: can Mouse Pick ignore trigger colliders ?[SOLVED]
« Reply #3 on: July 09, 2013, 04:37:20 AM »
Perfect  ;)  :P I like solved problems!