x


Stop trail renderer from terminating half-way into the camera.

I have a camera following an object with a trail renderer, however when the trail renderer intersects with the camera it cuts the trail renderer off at that point.. is there a way to prevent this happening, or as an alternative ensure that the trail renderer always fades out before it intersects with the camera?

alt text

more ▼

asked Apr 19 '12 at 03:00 PM

Comaleaf gravatar image

Comaleaf
83 3 7 7

(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

Not had a chance to try Lasse's answer yet, but I stumbled across an alternative that works: setting the 'near' clipping plane in the Camera inspector from 0.3 to 0.01 prevents the trail from clipping until the edges, which is much preferred.

Are there any disadvantages to this approach?

more ▼

answered Apr 19 '12 at 10:34 PM

Comaleaf gravatar image

Comaleaf
83 3 7 7

(comments are locked)
10|3000 characters needed characters left

You should be able to create a shader that applies additional transparency when near the camera in the material you are using. You can find our built in shader source code here. Then look up the shader you are using, make a copy of it and apply the necessary modifications.

more ▼

answered Apr 19 '12 at 04:20 PM

Statement gravatar image

Statement ♦♦
20.1k 35 70 175

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x2991
x33

asked: Apr 19 '12 at 03:00 PM

Seen: 483 times

Last Updated: Apr 19 '12 at 10:34 PM