Coin magnet in endless run

hi , I make endless run game and I wanna add magnet to collect coins but I cant do it , i wanna add link to know what i want . youtu.be/Bu9vgoIJAD4?t=1m20s

please help me :frowning:

There is a tutorial called Battery Collector, it shows how to make a magnet like pickup effect. You will need to search for it though, I didn’t find an easy link to it.

Hi ROSE_HEART,

The way I would set this up is create an overlap sphere in the character that, when it overlaps with the coin blueprint run a custom event within the coin that lerps the coin to the location of the character on a timeline.

Can you please explain it to me in a video or a photos

Absolutely, though this is a simple example, you will need to adjust it to fit what you are doing.

First, in the coin, we set up a simple overlap that runs a timeline when the player overlaps the coin. At this moment, we don’t care about the radius, just that the coin is overlapped and moved to the player when overlapped:

After this, You need to go to your player character and set up a sphere collision component with the collision set to overlap all:

In the character event graph, I have a number of functions set up to trigger the sphere to have collision on and off on a timer, to give it the feeling you would look for in a temporary buff. In the image we have a timer to count down how long the effect remains, a custom event to turn on the buff and add time if re-triggered, the actual magnet event which turns on/off collision of the larger sphere, and an input event to test.

Finally, I have set up a pickup item to trigger the magnet effect. The platform and pickup look like this:

As stated previously, you will want to heavily modify this type of interaction to fit what you are attempting to accomplish. Once you have done so, you should be able to get a great variation on the types of behavior you are looking for.

Hello , I am having some trouble with this, as the sphere collision I created around my runner, overlaps the box collisions I have made on my platforms, that spawn new platforms when I pass over them. This then means that they are spawning much faster and begin to intersect one-another, creating a big mess. I played around with the collision presets but was unable to find a solution. I followed the tutorial by Unreal Engine on creating an endless runner, as I am very new to the software, so my game currently looks like his does after the sixth video. Any thoughts on fixing this?