Tractor beam the powerups

The tractor beam drags the powerups to the player when the C key is pressed.
Code in Powerup scrip[t controlling movement toward the player.
MoveTowardPlayer function in Powerup script.
PullPowerupToPlayer function in Player script
Excerpt from void Update within the Player script

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store