Playmaker Forum

PlayMaker Feedback => Feature Requests => Topic started by: hh on February 08, 2016, 12:20:05 PM

Title: Raycast option to ignore triggers
Post by: hh on February 08, 2016, 12:20:05 PM
It would be useful for the Raycast action to optionally ignore trigger colliders in the scene.

The ideal functionality would mirror Unity's QueryTriggerInteraction enum:
http://docs.unity3d.com/ScriptReference/QueryTriggerInteraction.html
Title: Re: Raycast option to ignore triggers
Post by: mdotstrange on February 09, 2016, 03:09:30 AM
I modified the raycast action to ignore triggers and saved it as a separate action- find it here http://hutonggames.com/playmakerforum/index.php?topic=12202.0

Just had to add QueryTriggerInteraction to this line

Code: [Select]
Physics.Raycast(originPos, dirVector, out hitInfo, rayLength, ActionHelpers.LayerArrayToLayerMask(layerMask, invertMask.Value), QueryTriggerInteraction.Ignore);
Title: Re: Raycast option to ignore triggers
Post by: dudebxl on February 09, 2016, 10:19:47 AM
+1 to add to ecosystem

@mdotstrange. Thanks you for all the recent actions. Could you possibly put them on the ecosystem (using snipt.net). Many thanks
Title: Re: Raycast option to ignore triggers
Post by: hh on February 09, 2016, 01:35:52 PM
Thank you.
Title: Re: Raycast option to ignore triggers
Post by: mdotstrange on February 09, 2016, 08:16:54 PM
@hh No prob!

@dudebxl I have just hacked a few together  :) I added them to snipt and they should now show up in Ecosystem- thank you for all your awesome actions! I use them all the time and plan to use the fighter cam one you did soon  :D