- Home /
How to connect two objects on collision?
I want to connect two game objects when they collide with each other. I tried doing this with distance joint 2D (Attaching it to the object that collides into the other object and trying to connect them with ".connectedBody" using "OnCollisionEnter" function), but no matter how I tried to write the script I couldn't figure it out. Any other ideas? If possible a short example with a script.
Answer by AbdullahSyed · Jun 11, 2015 at 10:48 AM
You can do this by making one object child of other. childobject.transform.parent = parentObject.transform;
Hello Sir may I asked how to make like rocket mania game rotate pipe at script & connect to finish Sir.Thank you very much Sir
Your answer
Follow this Question
Related Questions
Keeping balls that stick together together 1 Answer
How to make two objects connected by a joint collide? 1 Answer
Collision problem 0 Answers
switch object when collided with? 2 Answers