Flying coin

Hi,

how can i make a coin when you are very close to them they will fly to the character?

Thanks in advance,

Make a Collision Sphere around the coin, when character touch the sphere, it will trigger Sphere’s OnComponentBeginOverLap on Coin, check if Overlap Actor is Character, create 1 Character Variable and set to the overlap character.

Add a Event Tick in Coin, check if the Character Variable is valid then you move the Coin to the character Location by Vinterp To this will smooth the transition, you can change the speed in InterpSpeed. And check for distance between coin and character, if it close enough then you can do whatever you want there.

Make sure you make coin sphere only overlap with character or pawn, and should not block by anything.

thanks for the help