Playmaker Forum
PlayMaker Feedback => Action Requests => Topic started by: Sjones on April 12, 2013, 02:13:00 PM
-
I am having problems with triggers, custom meshes and instantiating objects with rigidbodys.
However for the most part I have work arounds for the problems I am having.
The last issue is fixed if I manually set IsTrigger to true when I need it to be, I know that this can be done in PM 1 at a time, however with each object having multiple colliders and then I have multiple objects, I would have to set over 300 colliders properties to IsTrigger = true
So I was wondering if there was an action someone could make to set all child objects colliders (be it box, sphere, mesh etc.) IsTrigger to a bool value.
I am not even sure this is possible but would mean that I would only need to set it for each object and not for each collider for each object.
thanks
-
found this bit of code on the unity forums
foreach (Transform child in transform)
{
child.collider.isTrigger = false;
}
I am not sure how exactly to use this in PM as I gather this would of been put on an object and then it uses that objects children.
the object would have to be specified within PM and then use the above code.
any help would be fantastic.
-
If i have to do mass changes like this i get the objects in an arrayMaker array (search the forums), then use "get next" to loop through all the gameObjects and apply the changes.
-
Hi,
you also have a custom action for iterating, without the need for arrayMaker, simply use GetNextChild action
bye,
Jean
-
thanks guys, with your suggestions I think I have solved my issue.