Skip to main content

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

Screenshot 2023-10-05 at 13.36.52.png

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.

Screenshot 2023-10-05 at 13.39.31.png

4. This is the initial view when I land in LivingRoom1 from the Terrace

Screenshot 2023-10-05 at 13.41.50.png

5. And this is the initial view when I land in LivingRoom1 from the LivingRoom2

Screenshot 2023-10-05 at 13.42.26.png

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

Screenshot 2023-10-05 at 14.39.35.png

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:

Screenshot 2023-10-05 at 14.41.41.png

  • 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!