A Short Tutorial Video on a Simple Way to Make a Title Screen For VR or a Screen Experience:
Imagine that the world stands still at the beginning of your show/game/experience -- awaiting some user interaction to set it into action. You may set the Terrainspace timeline to inactive. Or you may want time in the space to be ticking along but have gravity inactive. There's many ways you may want to setup a pre-start state, an interaction, a transition and a run/play state. No matter how you do it... there's two fundamental parts to the Title Screen / Launch Menu: 1) defining you pre-start state, 2) interaction triggering start state.
Step 1: Define your pre-start state:
What properties define the pre-start state? What do you want to be inactive at the start? What properties high, what low? Certain timelines inactive others active? Some music clips playing while others waiting? Gravity frozen? Lights down? Time of day...? Player camera/VR Rig position at some 'ready to fly in' location? There's many things that define that beginning state.
In the tutorial video above we have the beginning of an experience that has the VR user following a ball down hills. So to create a pre-start state: we set the TerrainSpace timeline's active property to false. This makes time (in the TerrainSpace) stand still and therefore its gravity is frozen as well. Note: the universe timeline (one level up from all the spaces, including the TerrainSpace keeps on ticking and there
To do this:
- Click the terrain in the world,
- undock the property panel,
- in the left pane find timeline and select it,
- then click its 'active' property words true to switch them to false.
Step 2: Setup a menu (of sorts)
In our example in the video, the selection (mouse click or VR Laser grip button press) of the "Start" text sets our world to active (through script). The TerrainSpace timeline's active property switches to true and time begins ticking in the space. This enables gravity and physics, which in turn has our ball fall into motion and the VR Rig follows. The chase is on! In our game, this is play time.
- A bare bones menu is generated with a PlaneEntity and a TextEntity. The plane is created with a texture (jpg or png image) dropped into the space (creating a planeEntity) and rotated up to face the VR Rig (within laser interaction reach).
- We next place text right up in front of the background. Entities>Text>draw in space. And change it to say "Start". "TextEntity>Properties>TextShape>Text.
- You'll probably want the text and the plane to move together so you'll want to make the text a child of the plane. In the Hierarchy Panel grab TextEntity by its letters and drag it on top of PlaneEntity.
- Setup the interaction:
- Expand (Hover): This gives the user some feedback to know that they may have a button on their hands. : interactions>expand(hover)>select the "start" text in the space.
- Script to start the timeline: We just need an 'onPress()' event to set our timeline active property to true.
- Select "Start" text>properties>interactable>onPress() and in the Lua scripting window:
function MeshEntity:onPress(seg, normal, anchor_node) Timeline = findObjectByUid("2YEA5FT9P7K883C3BWFMZ9JDL0") Timeline.active = true end
You may want to make a variation on the bare bones theme we present in the video... but the instructions are pretty versatile once you get the basics down. One example would be to make the "start button" be designed as single image file itself... or it could be a 3D model ("click the hedgehog to begin"...