Jordan's Log: Week 4
- Jordan Sanderson
- Feb 27, 2017
- 1 min read
This week I worked on making the UI more usable for VR. I added a camera mode I call the stats viewing mode. When in this mode the camera will move from the edge of cell to cell being able to view the stats. Using some vector math I move the stats UI ~1 unit away from the cell, have the camera move ~1.5 units away from the cell, and rotate the UI to look at the camera. Once I got the math worked out it wasn’t too hard to implement, but I did have some problems. Because I didn’t want it working on the Y axis sometimes all axis on my direction vector would be 0 so I couldn’t normalize it. I initially had a check if the magnitude of the normalized vector was less than 1, but with float error sometimes the magnitude would be one thousandth off and mess up the whole thing. All I did was change the check to be less than .9. Then I tried working with Unity’s shaders again. A few people on my team wanted objects for their scenes to be inside of, so I tried to disable backface culling. However, when I tested it out without a texture, lighting, or shadows it was all one color causing it to be very disorienting. Once I can get lighting and shadows more optimized for mobile VR I will go try and fix this shader.
Comments