Fixed size trail renderer

I am working on SFCave 2d game.
For this I am using trail renderer to show line behind player. At present I have implemented basic functionality of trail renderer and it is working fine.

Now I want following changes in basic trail renderer.

  1. I always want fixed size trail renderer not change size of tail based on position
  2. At start of game, right now there is no trail drawn but I want some specific size trail to be drawn at start also.
  3. In original game there is dotted trail is created so for implementing this what is the basic concept?

Please give some suggestions in this. If any market plugin can help me in this then suggest this also.

Hey there, I’ve also got the same issue like you, here’s the answer I came up with (actually pretty simple): Create a new script and add it to the gameObject:

private void Update()
trailRenderer.time = Mathf.Abs(1f / rb.velocity.magnitude);
This basically just checks the current speed the rigidbody has and then turns the time around to make if fit the current velocity magnitude. @siddharth3322