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.pngScreenshot 2023-10-07 at 11.41.05.png

Screenshot 2023-10-07 at 11.37.04.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 for a Scene when isyou want it to be 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.pngScreenshot 2023-10-07 at 11.39.08.png

4. This is the initial view when I land in the LivingRoom1Hallway from the TerraceLivingRoom

Screenshot 2023-10-05 at 13.41.50.pngScreenshot 2023-10-07 at 11.43.22.png

5. And this is the initial view when I land in the LivingRoom1Hallway from the LivingRoom2Bedroom2

Screenshot 2023-10-05 at 13.42.26.pngScreenshot 2023-10-07 at 11.44.09.png

6. Maybe you don't think is verynot usefultoo in this case, and I can give you that,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

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. InIf 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.pngScreenshot 2023-10-07 at 11.48.05.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. 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!