TrailRenderer position screwed up?

I’m trying to put a TrailRenderer in my game and that part’s easy, but it seems to totally screw up the Y position in the transform of the object it’s attached to.

Here’s a way you can reproduce it:

  1. Create a game object with a trail renderer.
  2. Drag the root object upwards or downwards.
  3. Notice how the transform Y position of the object corresponds with where you’re dragging it… or not. If you drag it up, the transform’s position goes down, if you drag it down the position goes up. And these aren’t 1:1 ratios either.

I don’t know if this is just an issue on my copy or something… I figured I’d find lots of complaints about this. Even if you attach the TrailRenderer as a child the position of the root object will be totally wrong. For all but the simplest applications, therefore, you simply can’t rely on a TrailRenderer, because it can easily mess up the transform position of any parent object of the renderer.

What results do you all see?

Hi eli,

Can you post a small example project demonstrating this… just curious to what exactly is happening the way you set it up.

Thanks,
Ethan

Attached is a project folder with the trails I was using that caused problems. Open up Test.unity and then drag and move either FlungBat or BatTrail in the editor. You’ll notice that when you drag upwards on the Y the transform position goes bonkers. With the FlungBat object, it clearly goes to a completely wrong place relative to the root object.

105353–4038–$test_101.zip (576 KB)

Sorry eli, but here it works as expected… if I select the “FlungBat” and move it around the Trail Renderer starts at the bottom of the bat where it is placed. “BatTrail” also works as expected.

Can you give a little more info about what version of Unity you’re using and maybe some system specs? I can’t imagine why you’re seeing such odd results.

Ethan

Hm, I wonder why it works where you are. Here, let me take a video of what I’m seeing. After doing it again and looking at the video, it appears the reported position of the transform (in the inspector) is correct, but the coordinate inside the editor (in the scene) is wrong.

From this example project it looks like it would function okay from inside a script, but I was getting really weird values for transform.position, although maybe something else was the cause. I’ll look more into it.

107615–4119–$trailproblemmov_207.zip (2.49 MB)

Simply solution.