Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: wheretheidivides on April 05, 2015, 12:19:21 AM
-
So I have a tank that has 2 or more box colliders on it. I want to be able to use the tank without the colliders for menus. I tried the action 'destroy component' but it only destroys 1. if I try to do multiple ones, it only destroys the first one. the component name I am using is 'BoxCollider'. This is a prefab that gets instantiated in the hierarchy though a variable.
So is there a way to tell the colliders apart? Maybe different names or something?
-
You're right, it'll only grab the first one and disregard the second, unless they are different types (Box/Sphere/etc).
But -- if you can point at them directly (like dragging the individual colliders into the State and choosing Set Property), it seems disable works fine.
Hope that could be of use.
/Bad
-
I can't point at it because I instantiate a copy via a prefab. All I have is a game object variable. Right now my only workaround is before I instantiate the copy, I turn off the prefabs colliders. When the scene is over I turn them back on. Not ideal.