- Home /
LOCAL Trail Renderer
Hi.
I am having a little trouble with Unitys built in Trail Renderer. Is there a way to move the "whole" trail all at once to a new position.
In my game i have to move the entire scene (including most visible gameobjects and cameras) back to the center of the coordinate system. Whenever i do that the Trail Renderer creats a huge line between the last and current worls space position and i don't want that.
Is there a way to make a Local Spaced Trail or somehow move the Vertices of a trail all at once? The perfect component would be a local spaced trail renderer (just like local spaced particle systems exist)
Thanks for your help!
Answer by YesNoKonrad · Oct 17, 2016 at 07:58 AM
TL;DR: 1) trailRenderer.enabled = false; 2) move 3) trailRenderer.enabled = true;
Since the trail renderer has no Pause() function like the particle system i simply recommend to set the enabled property to false, move the object and then set the enabled property to true again.
What you actually do is to disable the monobehaviour (from which a trailrenderer derives) which supresses the automatically executed functions defined by unity.
Hope that works. :)
Thank you! Sound good, i will try it out tonight ;)
Do you think this will also move the vertices of an existing trail - or just get rid of the unwanted long line that gets created whenever i re-center the parent? -> Like will the trail "reset" or "continue" after i enabled it again.
Cheers!
Your answer
Follow this Question
Related Questions
Convert Trail Render To Solid Object 0 Answers
Any way to pause the Trail Renderer ? 1 Answer
Using iTween.MoveTo() for paths in local space 1 Answer
Trail Renderer needs more prescision! 1 Answer
Trail Render into 3d Object 1 Answer