My character is piloting an ATV . I want him/her to fall off during a crash .
void OnCollisionEnter(Collision col)
{
if(col.gameObject.tag==“xyz”)
ChildGameObject.transform.parent=null;
}
My character is piloting an ATV . I want him/her to fall off during a crash .
void OnCollisionEnter(Collision col)
{
if(col.gameObject.tag==“xyz”)
ChildGameObject.transform.parent=null;
}