Field of View Tutorial E01 - by Sebastian Lague

January 14, 2019

Field of View

Tutorial – E01

Youtube -Field of view visualisation (E01)
By: Sebastian Lague

This tutorial sets up a field of view (FoV) for a character. This FoV gives basic sight to a character. This sight has a radius and a viewing angle, and it is blocked by obstacles. This FoV also has a global setting that determines if it follows the character’s rotation or not. There are also editor elements that make it visually very clear what is happening by drawing out all of these factors.

Unity angles: Normally we start with 0 degrees to the right of the circle, but Unity starts with 0 at the top of the circle (where you’d normally have 90 degrees) for its angular math calculations. Since sin (90 – x) = cos x, this just means we swap sin and cos in Unity math.

PROBLEM

I had an issue with GetAxisRaw command not working for mouse inputs with the axes being “Horizontal” and “Vertical”. It just constantly returned a value of 0. This was ok with keyboard inputs however.

Comments

Popular posts from this blog

Online Multiplayer Networking Solution Tutorial Using Unity and Mirror - Tutorial by: Jason Weimann

Exporting FBX from Houdini with Color

Houdini Assignment - Fuse and Group