- Home /
Player Guide (particles) destroy collectable
Hello. I have a player in my scene and a particle ball next to the player. I set the particle ball to a child of the player. The particle ball is like a guide. I want to know if there is a way so that while I'm running with my player and there is a jewel the particle ball (guide) of the player move to the jewel and collect it and move back to the player and keep following him. I saw this effect in the game "Ori and the Blind Forest" and thats where I got my idea from.
Any help will be much appreciated.
Here is one way you might be able to do it. Have a large trigger sphere around your player and then when it collides with a collectible item use somthing like Vector3.Lerp or Vector2.Lerp(if you are thinking 2d) to move the guide to the collectible item. Then when it gets the item use Lerp again to bring the guide back to the player. You might not want the particle ball to be a child of the player but I am not sure.