coin magnet in endless run
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.
answered Jul 20 '16 at 08:43 PM
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.
answered Jul 20 '16 at 09:25 PM
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.
answered Jul 21 '16 at 07:54 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here