Playmaker Forum

PlayMaker Updates & Downloads => Share New Actions => Topic started by: dudebxl on April 29, 2015, 03:02:01 PM

Title: Enable Collider (Enable Collider by tag)
Post by: dudebxl on April 29, 2015, 03:02:01 PM
Enable/Disable colliders on Gameobject or Enable/Disable colliders on Gameobject by tag.

Enable collider:
Set specific collider or select collider type (all colliders of that type)
all collider = All the colliders are Enable/disable on gameobject (will ignore 'Set specific collider'/'Select collider type')

Enable collider by tag:
Select collider type (all colliders of that type) or Enable/disable all collider types on that gameobject with tag (and layer if on).

Tested in unity 4.x only..

Update: all actions + updates are on ecosystem or https://snipt.net/dudebxl/ (https://snipt.net/dudebxl/)
pm if any bugs.. 
Title: Re: Enable Collider (Enable Collider by tag)
Post by: wheretheidivides on May 03, 2015, 05:57:47 PM
I was just about to ask if there was an enable for colliders.  Good job.
Title: Re: Enable Collider (Enable Collider by tag)
Post by: wheretheidivides on May 03, 2015, 06:05:33 PM
I know this is dumb, but in your next update the 'i' should be caps "I".
Title: Re: Enable Collider (Enable Collider by tag)
Post by: dudebxl on May 03, 2015, 11:49:23 PM
Lol, thx..

will do but only if we find a bug but I appreciate the feedback. ;D
Title: Re: Enable Collider (Enable Collider by tag)
Post by: dudebxl on May 04, 2015, 11:13:56 AM
wheretheidivides, was looking at the attached picture. Out of curiosity, why are both collider type + all collider set to True? I built so if you use all collider, all the collider on a game object are on/off. If you use dropdown, only that type of collider is on/off..  just wondering, always nice to understand what the actions are used for.. ???
Title: Re: Enable Collider (Enable Collider by tag)
Post by: wheretheidivides on May 04, 2015, 11:45:31 AM
I didn't know how you set it up.  No instructions.  I guess that I had a type sphere and wanted all of them off or on.
Title: Re: Enable Collider (Enable Collider by tag)
Post by: dudebxl on May 05, 2015, 02:09:50 PM
My bad..

Updated intro text. Thx for the feedback..
Title: Re: Enable Collider (Enable Collider by tag)
Post by: wheretheidivides on May 05, 2015, 06:37:22 PM
That works with the text instructions.  How does one get that so when you click on the book, it goes to playmaker's website and shows the instructions?  Maybe lane or someone can help. 

this is the 1 thing I notice missing about actions written by others.  I use them all of the time.
Title: Re: Enable Collider (Enable Collider by tag)
Post by: wheretheidivides on May 05, 2015, 10:52:07 PM
I get these warnings when trying to use these actions:

Assets/PlayMaker Custom Actions/EnableColliderByTag.cs(11,35): warning CS0414: The private field `HutongGames.PlayMaker.Actions.EnableColliderByTag.script' is assigned but its value is never used

Assets/PlayMaker Custom Actions/EnableCollider.cs(144,40): warning CS0219: The variable `temp' is assigned but its value is never used
Title: Re: Enable Collider (Enable Collider by tag)
Post by: dudebxl on May 06, 2015, 12:34:29 AM
Hi,

Can you send me more info (settings + which collider on what + child info). Just redid a few tests and everything is ok on my side so I need to reproduce the problem.. but it looks like you are missing colliders on gameobject(s) or child(s)?
Title: Re: Enable Collider (Enable Collider by tag)
Post by: wheretheidivides on May 06, 2015, 11:55:10 AM
It's not how I am using it.  The error in the console comes up pointing to the project script.
Title: Re: Enable Collider (Enable Collider by tag)
Post by: dudebxl on May 06, 2015, 05:47:47 PM
aargh dude, yeah i found them   :'( it was lost in all the other warnings in my console. i will clean up the script in the next few day and let you know.. at least it is just a simple warning info and not an error..  :D

Updated - download update above or from ecosystem.
Title: Re: Enable Collider (Enable Collider by tag)
Post by: joshuabogart on September 11, 2015, 09:53:16 AM
This script just saved me quite a bit of time. Thank you, it works perfectly.
Title: Re: Enable Collider (Enable Collider by tag)
Post by: djaydino on August 27, 2016, 01:09:17 PM
Hi,
I found this action but no 2d version so i have made a 2d version from your action and i have added this to the Ecosystem
Title: Re: Enable Collider (Enable Collider by tag)
Post by: dudebxl on September 06, 2016, 11:11:37 AM
Very cool.. many thanks  :D