Tutorials

Metaverse Draw Lots-Using Variable and Lists of MR Project

This tutorial includes logic of "Transform, Actions, Controls, Events, Events and List".

We will learn about:
Keep from simultaneous click,
Come up draw lots after setting visibility to false
Randomly come up lot after clicking the box

 
  1. Open PowerPoint, edit image and export it.

 
  1. file>save it to jpg

 
  1. open Blender>import FBX>shift to Shading>change the image



 
Object's basic setting 
  1. Drag 3 model to the scene.  
    Add text of "correct " and "wrong".

 
  1. Drag box to the scene, and put "lottery02、lottery02(1)、lottery02(2)" to lottery01.
  2. Put lots to the box and adjust the angle in needs.

 
  1. Close the objects besides 3 models.

 
  1. Add all of object logic.

 
  1. Open the logic.

 
  1. Set the object's visibility to true.

 
  1. Add variable>keep from simultaneous click and set the visibility to false.



 
  1. Add "If…do" logic.
   (1). Set "keep from simultaneous click=false"
   (2). Set object's visibility to true.
     Note: add text of "wrong".
   (3). Add variable "keep from simultaneous click=false".
     Note: you can not click the objects before step4.
   (4). Wait for 1 second.
   (5). Set object's visibility to false.
     Note: close the text of "wrong".
   (6). Set "keep from simultaneous click=false".
     Note: close the situation that can not click objects.
   (7). Copy 2 and adjust the other object's trigger situation.


 

 
  1. Take the model of giraffe for example.
    1. Copy three model and set their visibility to false.
    2. Set lottery01 visibility to true.
    3. Add variables>start to draw lots >true.



Draw Lots Setting
  1. Add "When…is clicked" >set the up moving animation.
  2. Add "If…do">set variable of start to draw lots to true. You can repeatedly click.
  3. Set click for once, add variable to false and put it on the animation's top.
  4. Add variable : lot result.
  5. Set lot result: operators>random number from …to…
  6. Set random number from 0 to 5.
    • Set random number from 0 to 5 (01234) in logic.
    • EX1: set 0~5, it will be 01234.
    • EX2: set1~6, it will be 12345.
    • EX3: set6~9, it will be 678.
  7. When setting lot’s visibility, you could know that the coming up of animation and lot is too close, so add wait for 1 sec. 

  1. Add "create empty list" and add "MyList" to variable.
  2. Add data>lists> add transform item to MyList.
  3. Copy 3 and put them behind create empty list.

 
  1. Data>list>set set "add my list to lot result" visibility to true.

 
  1. Repeatedly click setting
    1. Event>when…is clicked.
    2. Set Lottery (1) visibility to false.
    3. Copy animation and change it to moving down. 
    4. Set "start to draw lots" to true.

 
  1. Finish and start to experience!