- Home /
Question by
MarsBellona · Jul 17, 2017 at 05:40 AM ·
collisions
How do you free a child opbject from it's parent upon collision ?
My character is piloting an ATV . I want him/her to fall off during a crash .
Comment
Answer by vir1234 · Jul 17, 2017 at 05:59 AM
void OnCollisionEnter(Collision col)
{
if(col.gameObject.tag=="xyz")
ChildGameObject.transform.parent=null;
}
Your answer
Follow this Question
Related Questions
Checking Child collisions through parents 1 Answer
Collision angle of collided 1 Answer
iOS Rididbody Collisions 0 Answers
Getting events to happen inside of collisionboxes. 0 Answers
Detect when CharacterController is not colliding? (SOLVED) 1 Answer