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 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 3 Hotspots in the Hallway, this means we can "land" in the Hallway from three different Scenes: LivingRoom, Bedroom1 and Bedroom2. 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 a new element 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 for a Scene when you want it to be the same as the Initial Camera Rotation.
4. This is the initial view when I land in the Hallway from the LivingRoom
5. And this is the initial view when I land in the Hallway from the Bedroom2
6. Maybe is not too exciting, 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. If 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. Depending on the size of your images you might need to adjust this.
- 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!
If you like the Package, please consider donating to support the project!
No Comments