I am currently using Unity 3D to create a 3rd person game. But I am having an issue with trying to parent to the closest child transform of an object:
whenever the player comes into contact with a specific tagged gameObject, the collided game object becomes a child of the player. However I want it to child itself to the closest bone it collided at. So far i have set up a for loop that searches for the closest local position to the collided object and found the Vector3 of the closest bone.
But now I want it to child itself to the transform with that local Vector3. If anyone has any advice on how to do this then this would be greatly appreciated. If you would like to see example code, then just say.
Thanks