Grabbing food is quite easy sometimes, can make it interesting by bouncing it off whenever any obstacle hits it.
Bouncing must happen with good speed and slowly decrease to 0 i.e. resting state.
The direction of movement of food must be determined by where the obstacle is hitting it.
Optional:
Bounce speed can vary based on which obstacle hits, a bigger obstacle creates better momentum.
Note: It may happen that 2 obstacles are hitting the food one after other, in that case, food must bounce in different direction.
Grabbing food is quite easy sometimes, can make it interesting by bouncing it off whenever any obstacle hits it.
Bouncing must happen with good speed and slowly decrease to 0 i.e. resting state. The direction of movement of food must be determined by where the obstacle is hitting it.
Optional: Bounce speed can vary based on which obstacle hits, a bigger obstacle creates better momentum.
Note: It may happen that 2 obstacles are hitting the food one after other, in that case, food must bounce in different direction.