Trail renderer bug on spawned objects always starts at 0,0,0. Does not happen in 5.6.4p3 or earlier


Trail renderers appear to all start at 0,0,0 when instantiated. I’ve created a bug report for this. Will also attach project.

This is specific to 5.6.4p4 . Have not tested on 2017.

Is there any way to stop this from happening until next patch?

3342181–261003–TrailRendererBugDemo.zip (892 KB)

Bug report is: 984788

I have the same bug with 5.6.4p4. Have you solved it @rstorm000 ?

Hi,

This issue is fixed in 5.6.5p1 which is due out next week.
It was caused by the transform having the wrong value when Awake is called. Unfortunately there is no way to fix this from C#. You could try calling Clear in Start(Not Awake) to remove the bad value.

1 Like

Thank you @karl_jones ! Is this fixed in 2017.3.0f3 version?

Yes it went into 2017.3.0b5

Someone in the bug report said it was due to this and was fixed in 5.6.5. I was still experiencing it though on mac. Maybe she meant 5.6.5p1 like you said?

Yes its the first patch, not the release. I put it in myself :slight_smile:

https://www.youtube.com/watch?v=ULkuwxJTGtY

1 Like

Ah! I noticed this behavior when I updated from Unity 5.6.4p1 to 5.6.5 & 2017.3. Two days later, after reverting and incrementally updating Unity patch by patch (and updating all 3rd party assets), I found this thread! Looking forward to the patch!

1 Like

I was hoping to see the fix in the the recent patches (2017.3.0p2 and 2017.2.1p2) :frowning:

1 Like

Unity 2017.2.x was affected and is not fixed up to 2017.2.1p2 as far as I can tell. Frustrating little bug… We added a manual Clear() to clean up the trail data before use.

Hi. There is actually 2 bugs here. The first(Awake having the wrong position) is now fixed on all however we made a fix so that TrailRenderer would record the first position for this bug(Unity Issue Tracker - TrailRenderer doesn't function when object position is changed instantly) which seems to be the issue most are having. We have a fix for this we will backport.

Update:

After further discussion the changes we have made will not solve your issues.
The reason is that the behaviour was changed due to bug reports. This explains it in detail: Bent trails with artifacts - Unity Engine - Unity Discussions

1 Like

I am using the most up to date version of Unity with version 2020.2.3f1 and this bug still persists.
I would have definitely thought this would have been dealt with by now.

I am clearing the TrailRenderer positions in Start() using Clear(). I then set the initial position to the starting location of where the trail should originate.
To test, I am printing out the array of positions in FixedUpdate.

As soon as it starts, it lists the initial position at the correct location, but visually, the trail streaks off and still starts at the origin (0, 0, 0).

This is ONLY on the client, and not on the host.
I don’t know what more to do to resolve this.

Please file a bug report so we can look into it.

This was posted 2 years ago. Still not fixed. I am baffled.

Bug reports solves problems, not vague forum posts. There are at least two, but probably three separate bugs in this thread, so no one knows what “this” is you’re referring to. If you submit a bug report they can investigate what is not working for you. So please do.

3 Likes

Still spawns at 0.
Even if it is new Instantiated prefab with .Clear at start.

I have the same problem.