Advanced Tutorial
In this Tutorial we will continue with the project that we started in the Beginner Tutorial, and that we improved in the Intermediate Tutorial. If you haven't done it, please have a look at it.
1. First, let's setadd 2 new IndretsVRVirtualTour Scenes to the tour: Bedroom1 and Bedroom2. Set the Initial Camera Rotation for all our Scenes until they suit our needs. Go on to step 2 when ready.
2. As you know, we have 2 hotspots in LivingRoom1, this means we can "land" in LivingRoom1 from two different scenes: Terrace and LivingRoom2. What if we want to have different Initial Camera Rotation depending on which room we are coming from? Fortunately, we can do that with the Navigation Camera Rotation. Let's open the Inspector and add to new elements in the Navigation Camera Rotation
3. I'm going to define different rotations depending on which Scene we are coming from. Actually is not necessary to define a specific orientation when is the same as the Initial Camera Rotation but I've done it here for the sake of understandability.
4. This is the initial view when I land in LivingRoom1 from the Terrace
5. And this is the initial view when I land in LivingRoom1 from the LivingRoom2
6. Maybe you don't think is very useful in this case, and I can give you that, but I think it can be useful for example if you are walking across a hallway with many hotspots all the way. You might want to keep the navigation direction to offer a better experience to the viewer.
7. You can also limit the Min and Max vertical rotation of the Camera (and in fact, I recommend it). By default you can rotate between -33º and 33º, being 0º the horizon line. Feel free to experiment with it. If you want to change it globally you can modify the values in the Person prefab -> Main Camera
8. You can also experiment with the Camera Field Of View but it can give you some weird results. I've found 60 is the one that better suits me. If you plan to use a different one you might want to change it in the Person prefab -> Main Camera so it affects all your scenes.
9. In you select the Main Manager object and go to the Inspector, you'll find a few more settings. You don't need to modify these settings on the Main Manager prefab. They will affect all your scenes anyway:
- Indrets VR Main Manager script
- Mouse Sensitivity will determine how fast the Camera rotates when you Drag&Drop your mouse. The higher, the faster.
- Camera Fade script is provided by ReCogMission with some minor adjustments to my needs and is used for the fade in / fade out transitions between scenes. The main values are exposed in the inspector:
- Speed Scale specifies how quick your scene will fade in / fade out. The higher, the faster.
-
- Fade Color is quite self explanatory
-
- Curve lets you modify how the fade animation goes. Feel free to experiment but don't get out of bounds or things may not work as expected.
This is the last of the Tutorial series. Feel free to ask any question you may have and enjoy using IndretsVR Virtual Tour package for Unity!