- Home /
Parent colliding bullet to the object
Hi guys,
I have a bullet cloned prefab entering a cloned Collider prefab that makes its rigidbody isKinematic to freeze it on entry, however its not sticking to the object.
I can manage to stick the Target to the Bullet, but not vice versa.
ie "parent colliding object to collision object"
As they're cloned prefabs I cant call on them by name - I just need it to dynamically find them.
(the collision object is the one with the script on it)
No amount of digging through forums can find me a working C# answer. Any help would be fantastic!
Comment
Best Answer
Answer by UnityCoach · Dec 06, 2016 at 11:12 AM
I guess something like this may work :
collision.transform.parent = transform;
//or
transform.parent = collision.transform;