This week I was working on GUS' user guiding line tool. This was originally labelled as a 12 hour task on scrumwise before being lowered to 9 hours.
GUS Guiding Line
Gus' user guiding line is the tool which shows the user a path to a component. It is a UI Component considered to be a Spatial Representation. It is part of the game environment however it is not part of the story. This is an important UI element as it potentially removes annoyance for the user if they cannot locate a component. The guiding line will be drawn from GUS to the component.
I started by looking at solutions online to drawing a line through C# in Unity. I found that using the line renderer seems like the best way for what we wanted to do. We add Vector positions to the line renderer and specify color and width to decide where the line will be drawn.
I use the starting GUS position vector and the target component position vector, cast a ray between them and take the positions of all objects hit in between. I created a method that when given these positions will get fifty vector points around it. This also uses the bounding box size of the object to decide how big of a radius is given. The start and end points are found by taking the normal of the two positions and then adding or subtracting them from a position.
I then made it so it detected multiple objects. It draws around each of them. There is small issues where two objects close to each other will cause two rings to potentially overlap however I will fix this in a later sprint as it is not game breaking and the line behaves as needed.
I also created an animated shader to use with the lines that are rendered. This gives the line a kind of directional feel and helps the user more again. I will include a light to be animated along as a pulse at a later date. This will give the line a clean feel and will remove the need for such a hard looking texture.
Issues
An issue I had this week was how the task was going to be overestimated before we started the sprint. We fixed this before the sprint started however and it did not become an issue as such. Other issues I had were difficulty creating a type of shader I wanted to. I had to settle with a simpler looking one in the meantime.