I know this has been asked several times before, but I don´t find the answer. So I have a parent object with 2 children. I had to separate one mesh into pieces because mesh colliders just don´t work. Holes and complex geometry go wrong with convex, so now the parent has a rigidbody with a collider and each child a collider. Another game object, let´s call it “object B”, has only a collider and is supposed to push the parent and its children at the same time.
So after testing I know that if I move any of the children it detects collisions with “object B” and act together with their parent. However, if the moving object is “object B”, which is the one supposed to be pushing the others, collisions work sometimes, but not always.
Besides that, am not making collisions with specific tags or something similar. Also, should I put a rigidbody on each child or should I leave it like this?
You should never nest rigidbodies. Rigidbodies are always simulated in world space. So keep your child colliders just the way they are. They actually act as compound collider for the parent. However the childs shouldn’t move relative to their parent.
Any object that is moving has to have a rigidbody component attached in order to detect collisions. Only rigidbody components can actually detect collisions, not colliders. Rigidbodies that aren’t moved will fall asleep after a short time once its velocity drops below the sleeping threshold. Sleeping rigidbodies can’t detect collisions either. If you move a collider without rigidbody into another object that has a rigidbody it may detect the collision if the rigidbody is awake when that happens. However if the rigidbody is sleeping, nothing will happen. Again, the rigidbody is the only component which can detect collisions, not the colliders.