From the course: Unity Medical Visualization: 03 Deployment and Usability

Unlock the full course today

Join today to access over 24,600 courses taught by industry experts.

Setting Unity platforms

Setting Unity platforms

- [Instructor] In the previous movie, we created the GetAxis function, which overrides Cinemachine's standard controls for controlling the FreeLook camera horizontally and vertically. Right now, because this function returns zero and only zero, then the camera is never going to move. What is going to happen is the GetAxisCustom function is going to run and Cinemachine is going to provide us with a string argument indicating the axis it wants to read input data for. Now, in our case, because we set up the FreeLook camera to use the horizontal and the vertical axes, these are the two different strings that are going to get passed into here. And for each one, we need to determine what the value should be. So we first want to check to see if they're going to be looking for the horizontal axis. So I'm going to type if Axis.Equals and we're going to check here for the string literal of Horizontal so Horizontal here. If the…

Contents