- Home /
Trail Renderer Getting Wrong Rotation
I have Ball as my main player, it has trail renderer attached to give more appealing look. But when I turn ball player as left and right, attached trail render get rotated and goes inside the ground, like this image:
I want it always remain flat on ground surface and only detect ball player horizontal movements.
Here is ball player inspector details:
Actually trail's transform never gets any rotation then also trail rotated so I become confused about this. I expect some proper explanation and solution into this.
Answer by sSuite · Dec 04, 2018 at 03:48 PM
The trail renderer is trying to face the camera, which can sometimes move parts of it through other objects. If you change the Alignment to Transform Z (or Local if you're before 2018.2), the planes of the trail will always face away from the forward direction of the object it's on. If you need to change the direction it's facing, you can rotate the object.
hope that's helpful!
I think, you are right - trail always try to face Camera center so that it was getting abnormal rotation. Can you explain me the solution? I want always it face upside.
Change Alignment to Transform Z, then rotate the object so that the trail is facing up
TrailRenderer ->Alignment -> "View" & "Local" two options exist. "Transform Z" not exist
so please include full details....