I have animated bear model in scene. I added Box collider as trigger for some bones of the model. Then player object throw a spear to the bear model. When spear hit collider of bone, bone should become a parent of the spear to make sense that when bear is moving, spear get stuck in it’s leg. But spear’s parent is not a bone but a model (((, it is my problem. Here is a script of spear:
function OnTriggerEnter (other : Collider) {
if(other.CompareTag("Bone")){
transform.parent = other.transform;
hit = true;
}
}