Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: autumnboy on April 20, 2018, 11:39:23 PM

Title: Does Spherecast or Spherecast2 hit triggers?
Post by: autumnboy on April 20, 2018, 11:39:23 PM
Hi, Does anyone know if spherecast or spherecast2 detects triggers? I'm having problems casting and I don't think 'show debugging' is working for it.

The Unity manual says theres a query for it:
https://docs.unity3d.com/ScriptReference/Physics.SphereCast.html (https://docs.unity3d.com/ScriptReference/Physics.SphereCast.html)

I also came across this post, which says they made spherecast2 ignore triggers:
https://hutonggames.com/playmakerforum/index.php?topic=16321.0 (https://hutonggames.com/playmakerforum/index.php?topic=16321.0)

Cheers,
Josh
Title: Re: Does Spherecast or Spherecast2 hit triggers?
Post by: autumnboy on April 24, 2018, 07:47:53 PM
bump
Title: Re: Does Spherecast or Spherecast2 hit triggers?
Post by: tcmeric on April 25, 2018, 12:23:56 AM
Spherecast from the ecosystem uses the system default.

You can change the default settings in your editor by going: Edit > Project Settings > Physics > Queries Hit Triggers .

Hover your mouse over this option to see the details/explanation.

Title: Re: Does Spherecast or Spherecast2 hit triggers?
Post by: autumnboy on April 25, 2018, 03:11:07 AM
I know about the queries hit trigger checkbox in physics. I just came across an old post saying spherecast would ignore triggers:
http://hutonggames.com/playmakerforum/index.php?topic=3658.0 (http://hutonggames.com/playmakerforum/index.php?topic=3658.0)

The docs for Unity 2017 say spherecast has an option to detect triggers. If it uses the system default then the spherecast action can detect triggers?
Title: Re: Does Spherecast or Spherecast2 hit triggers?
Post by: tcmeric on April 25, 2018, 04:47:44 AM
Spherecast the playmaker action from the ecosystem uses the system default. It could be coded to do either, but it currently is not. So its best to check your system to see what it is set to do. Normally it is set to true.

Additionally, I have created another version where you can override the unity default to your own choosing.

Title: Re: Does Spherecast or Spherecast2 hit triggers?
Post by: autumnboy on April 26, 2018, 05:14:21 AM
Okay,
Thanks for the info. Thanks for the action as well.

Cheers,
Josh