I'm trying to do a very basic thing, have my turret not collide with the missiles it's launching. Missile is a prefab reference.
The "Ball" child object is what the collider that's causing problems is actually attached to. There is another collider on the main GameObject but it's a trigger and used for activating the firing of the turret. Could having two colliders on different parts of a prefab hierarchy be causing issues? I've tried everything I can think of, even adding this to my Missile's behavior.
But the instantiated missile is still effected by the box collider. Of course, turning that collider into a trigger makes everything work fine, no more collisions, but then that breaks everything else. Any ideas?
asked Jan 27 '10 at 10:41 AM
The problem may be that if any objects have 'rigidbody' components, a rigidbody will use all the colliders (excep mesh colliders) on any of its child objects together as a single "compond collider". That is, unless the child object also has a rigidbody component, in which case the rigidbodies act as independently moving objects even though they have a parent-child relationship in the hierarchy.
So it could be that wherever your rigidbody component is (if you have one), it's greedily assuming that all child colliders should belong to it, and that may be causing confusion about which colliders should be ignored - or something like that!
Perhaps you could solve your problem by restructuring your hierarchy so that there's a separate gameobject with the trigger collider used for activating the firing, and make that entirely separate from the turret itself in the hierarchy.
answered Jan 27 '10 at 11:31 AM