Trail Rendering #5SD064

I’ve been working with unity’s in built trail rendering system this week. In our alpha demonstration and on from other occasions we’ve received critique about not giving the player feedback from using a teleport function.

My first thought was to have particles appear in connection with using the teleport, but just before I was to sit down and work with it I learnt about unity’s Trail render component, I thought that it would be easier to use that.

My first problem that arrived was to find a material which I could use, as we only have one artist I couldn’t ask him to do one. I tried several different materials from Unity’s asset package, even if some of them looked nice they all got rendered behind the background no matter which layer they were in. I found other materials on the world wide web which I also tried, but didn’t really like them. I decided to give a shot with the trails from unity again and try to solve the problem.

After a wile I got help with solving the problem. It was the material which had the wrong shader, I had to change it to Sprites/Default for it too work. I settled with a material that was made for a dust storm. when attached to a trail it almost looks like a fog.

trail

 

Now my second problem arrived, to activate the trail only when using the teleport. It was easy to code it into the teleport script, it was another story to make it work as I wanted. Problem was that the trail got activated, but started to render the trail after the teleport was done, or half the distance already was made. I asked my lead programmer for help but he was not very familiar with the trail render component, he had so much other stuff to do so I didn’t want to bother him with even more, not this close to beta at least.

I decided to have the trail on at all time instead. Even if it was the lazy mans way out of the problem I thought that it could work for the beta presentation and after that when my programmers has more time over they could help me with it. But after play testing with the trail on for a time now, I decided not to have it changed. It looks much better than anticipated and it feels good to play with it on.

About Joel Persson

2016 Game Design