playMaker

Author Topic: Enable Collider (Enable Collider by tag)  (Read 13723 times)

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Enable Collider (Enable Collider by tag)
« 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/
pm if any bugs.. 
« Last Edit: May 31, 2015, 06:08:00 PM by dudebxl »

wheretheidivides

  • Sr. Member
  • ****
  • Posts: 496
Re: Enable Collider (Enable Collider by tag)
« Reply #1 on: May 03, 2015, 05:57:47 PM »
I was just about to ask if there was an enable for colliders.  Good job.

wheretheidivides

  • Sr. Member
  • ****
  • Posts: 496
Re: Enable Collider (Enable Collider by tag)
« Reply #2 on: May 03, 2015, 06:05:33 PM »
I know this is dumb, but in your next update the 'i' should be caps "I".

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: Enable Collider (Enable Collider by tag)
« Reply #3 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

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: Enable Collider (Enable Collider by tag)
« Reply #4 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.. ???

wheretheidivides

  • Sr. Member
  • ****
  • Posts: 496
Re: Enable Collider (Enable Collider by tag)
« Reply #5 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.

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: Enable Collider (Enable Collider by tag)
« Reply #6 on: May 05, 2015, 02:09:50 PM »
My bad..

Updated intro text. Thx for the feedback..

wheretheidivides

  • Sr. Member
  • ****
  • Posts: 496
Re: Enable Collider (Enable Collider by tag)
« Reply #7 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.

wheretheidivides

  • Sr. Member
  • ****
  • Posts: 496
Re: Enable Collider (Enable Collider by tag)
« Reply #8 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
« Last Edit: May 05, 2015, 10:55:36 PM by wheretheidivides »

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: Enable Collider (Enable Collider by tag)
« Reply #9 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)?

wheretheidivides

  • Sr. Member
  • ****
  • Posts: 496
Re: Enable Collider (Enable Collider by tag)
« Reply #10 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.

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: Enable Collider (Enable Collider by tag)
« Reply #11 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.
« Last Edit: May 31, 2015, 06:04:35 PM by dudebxl »

joshuabogart

  • Playmaker Newbie
  • *
  • Posts: 7
Re: Enable Collider (Enable Collider by tag)
« Reply #12 on: September 11, 2015, 09:53:16 AM »
This script just saved me quite a bit of time. Thank you, it works perfectly.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Enable Collider (Enable Collider by tag)
« Reply #13 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

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: Enable Collider (Enable Collider by tag)
« Reply #14 on: September 06, 2016, 11:11:37 AM »
Very cool.. many thanks  :D