How to let the vectory turn a direction?

Hello everyone. Now I throw out a sphere to a cube and I hope the sphere can turn and move to the cube's direction. Like this image:

alt text

and like the bucket in "Donkey Kong Country Returns"(1:13~1:19)

Have any way can make this? think you.


  • OnCollisionEnter

check if the hit object is the cube you mentioned, using it's tag or name.

transform the direction of the sphere to the cube's transform.forward (if in the picture the forward is the direction of the second arrow. Else change your cube for that to be true).