On Unity you can choose for an object to do a certain function by writing the code out for it, but If you want to be lazy like me you could create an animator to do almost everything you want. You will just need to set it up like this:
public Animator ani;
}Another trick is giving 2 object rigidbodies, one you can move the other which can't move anywhere. Then put another object (with or without a rigidbody) that will move by itself inside the object that can't move. After after that when you move your first object ontop of the second it will auto bounce.
Help Support Me Please: