- Home /
Question by
adggames · Nov 12, 2010 at 03:50 PM ·
trailrenderer
How can I used TrailRenderer.startWidth ?
I am trying to set TrailRenderer.startWidth
This is my code : function Start(){ Trailrenderer.startWidth = 5.0; }
But is wrong, so How can I used TrailRenderer.startWidth ?
Thanks a lot.
Comment
Answer by Adam Rademacher · Nov 12, 2010 at 05:11 PM
You probably need to get a reference to your trail renderer. You'll have to declare this at the top of your script:
var trail : TrailRenderer;
Then set the reference in the inspector and use this code:
function Start()
{
trail.startWidth = 5;
}
Your answer

Follow this Question
Related Questions
Trail Renderer with historical GPS data from Sqlite DB 0 Answers
How to make trailrenderer collider? 0 Answers
Trail renderer draws trails so slow when using transparent texture 0 Answers
Trail Renderer Fade- changes to color array have no effect 0 Answers
Detect closed loop in TrailRenderer and get gameObjects inside 2 Answers