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

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Adjusting for mobile resolutions

Adjusting for mobile resolutions - Unity Tutorial

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

Start my 1-month free trial

Adjusting for mobile resolutions

- [Instructor] In this movie, we're going to continue on from where we left off in the preceding movie to create zoom functionality that will allow us to roll the middle mouse wheel to zoom in or zoom out of our view. In the preceding movie we created these orbit data structures that we're going to be using for controlling the radius of the different orbits around the heart. Now before we can do that, there are some additional variables that I want to add to our class. The first one is going to be a minimum and a maximum range. The amount of distance either way from our starting point that we can use to zoom closer or further from the heart. To represent that, I'm going to be using a floating point variable called the zoom range. So I'm going to create a public float, and I'm going to call it ZoomRange like so. It's going to start with the initial value of zero. Now I'm going to set the minimum and the maximum to be…

Contents