- Home /
Trail renderer leaves streaks
I have a bit of a problem – The game I am working on has balls with trail renderers that when they hit the outer walls they return to the center but they leave streaks from where they left to the center again.
Is there any code I can put on the game object to stop this from happening?
I would like to know how to stop this too. I am repositioning my ball after the player presses restart and the trail shows it as moving to that position...
Try disabling the trail renderer component before moving the object, and then enabling it again once it's in the desired position.
I have done this and when I re-enable it, the trail still does the same.
The only way I have done it so far is buy destroying the ball and then instantiating it.
Sorry for the delayed response, but something else must be the issue, because I've done this and it works. $$anonymous$$ind putting up some code so I can take a look?
Thank you for the feedback guys.
Here is my code. The trail render is just a component on the ball game object.
//Check if ball has passed the bottom hand side
if(transform.position.y < -25)
{
transform.position.x = 1;
transform.position.y = 13;
}
Your answer
Follow this Question
Related Questions
Recycled trailers leave streaks... 4 Answers
Spawning different GameObjects once player reaches certain score 0 Answers
Can trail renderer stop facing camera? 2 Answers
can't assign material to trail render added by script 1 Answer
Trail renderer draws trails so slow when using transparent texture 0 Answers