- Home /
Can't see trail renderer on game view
Hi, I'm having trouble displaying a trail renderer on top of a sprite in an overlay canvas. Any help is welcome.
Answer by programmerjason · Sep 26, 2017 at 08:17 PM
@LoBlanc Make sure you have the Main Camera's clipping plain "near" set to 0, if your using Camera.ScreenToWorldPoint(Input.mousePosition) to set your trail position it will be too close and the camera will clip it at a certain point. If you still have trouble seeing it, set the time longer and play with the camera's position and rotation so you can see it.
Answer by Yoshinator2 · May 04, 2017 at 03:08 PM
Make sure your sorting layer is correctly set. Also, in the hierarchy, the order in which they are in the hierarchy is the order they will render, Stuff higher up(children) in the order will render on the bottom, and the stuff at the bottom of the order will render on top.
If this is what you were looking for, please accept my answer. If not, feel free to follow up with any questions!
Answer by LoBlanc · May 04, 2017 at 03:25 PM
@Yoshinator2 I'm re-checking it, but still no result. I can see the trail in the scene editor being drawn on top of the sprite, and I also see it in the Camera Preview, but it's stiil not displayed in the Game view. I'm thinking that the problem is the sprite being rendered as overlay canvas, but it has to be this way
Are you using an orthographic camera or perspective camera?
Is the trail renderer assigned a sorting layer?
Your answer