stick objects

Hello, I’d like to make an object falling and when he collides with a specific object it sticks to the specific object like when something sticks to glue. please I need help with a c# script, i’m just a newbie but i’d like to learn.

Some options to test

  • Make the falling object a child of the object it hits (so it will then follow it, need to disable rigidbody2d after hit)
  • Add fixed joint between the objects on hit (not sure if this would be 100% non-shaky?)

example,settings object as a child of the big moving sprite:

3396242--267237--sticky.gif

thank you !! i’m gonna try this