- Home /
Question by
badjano · Apr 21, 2015 at 04:59 AM ·
gameobjectrigidbodycolliderchild
OnCollisionEnter getting child instead
I had this problem a few times now, and I lost my patience and did a:
while( go.transform.parent != null ){
go = go.transform.parent.gameObject;
}
I don't get it, the rigid body and the collider is on a gameobject, but the other collider triggers his child, it's weird... And it gets worse, on editor it works fine, but when I build it, it doesn't! I had to check my log file to make sure, Debug.log(go.name) was printing his child...
Does anyone have a clue why this might be happening? Anyway, I made it work, but it's not pretty
Comment
Your answer
Follow this Question
Related Questions
Physics.SphereCastAll to get rigidbody's like OnCollisionEnter 3 Answers
Mesh renderer does not move with parent rigid body 5 Answers
Ignore Collider 0 Answers
Unity creating static colliders 1 Answer
Get all child not working? 1 Answer