Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Trail on Stationary Object

Discussion in 'Editor & General Support' started by Rukongai, Dec 25, 2019.

  1. Rukongai

    Rukongai

    Joined:
    Feb 4, 2019
    Posts:
    3
    I am making a simple game where the character is going through some obstacles. I want to create a trail behind the character but the game works with object pooling and recycling so its impossible to do it with the built-in trail system. Is there any way I can do what I want to do? Thanks for the help.
     
  2. julian_cruz

    julian_cruz

    Unity Technologies

    Joined:
    Nov 21, 2016
    Posts:
    16
    Hi @Rukongai,

    I think the most efficient and easy way to do this is by using Trail Component. However, you're running into issues due to the way you're spawning your characters if I understand well. Can you describe how the built-in trail system is failing when you're using an object pooling and recycling?

    If we can fix this problem I'm sure you won't need to do any additional systems.
     
  3. Rukongai

    Rukongai

    Joined:
    Feb 4, 2019
    Posts:
    3
    Oh yeah i forgot to explain sorry about that. The backround and obstacles move and recycle but the player remains stationary only having the ability to move right and left, I find it's more efficient this way seeing as it is a simple game.
     
  4. julian_cruz

    julian_cruz

    Unity Technologies

    Joined:
    Nov 21, 2016
    Posts:
    16
    @Rukongai, I got it, so I'd suggest using the Particle System instead to achieve that.
    I did a small a quick particle in a blank project (see the attached gif) and I tweaked some values to achieve that (see images attached and values in the green square).

    particle.gif
    Also, there is a video on YouTube from one of our users that you can watch to see several trial effects using our particle system.

    particle.png particle settings.png

    I hope this is helpful to you.
     
    Din108 likes this.