Mission 4 Quiz - Custom VR Development

Quiz

Intermediate

+60 XP

10m

Unity Technologies

Mission 4 Quiz - Custom VR Development thumbnail

In this quiz, you will test the knowledge and skills you learned in Mission 4 related to Custom VR Development.

This quiz is part of the VR Development Pathway.

Question 1

Read the documentation below about the XRGrabInteractable class.

True or False:

If you added a new script called MyGrabbableObject using the code below, you would be able to grab it in VR.

public class MyGrabbableObject : XRBaseInteractable 
{
}

Select only one

Question 2

Read the documentation below about the GetAttachTransform method in the XRBaseInteractable class.

Let’s say you wanted to override this method in a child class and print a message to the console.

Which of the following code examples would do that with no errors?

Select one answer.

Select only one

Question 3

The code below shows an example of overriding a base class method.

protected override void OnSelectEntered(SelectEnterEventArgs args)
{
      // call base method
}

Which line of code would successfully call the base method?

Select one answer.

Select only one

Question 4

Read the documentation on Vector3.Dot below:

Read through the code below.

Vector3 firstVector = new Vector3(-1, 0, 1);
Vector3 secondVector = new Vector3(0, 1, 0);
private void Start()
{
   float dotProduct = Vector3.Dot(firstVector, secondVector);
   Debug.Log(dotProduct);
}

What would be printed in the console if the above code was run?

Select only one

Question 5

What is the best description of what is happening in the code below?

RaycastHit hit;
if (Physics.Raycast(transform.position, Vector3.up, out hit))
{
  Debug.Log(hit.transform.gameObject);            
}

Select one answer.

Select only one

Submit answers

To calculate your score, submit your answers to the quiz. A passing score will mark this quiz complete.

Correct answers needed to pass

4/5

Retake allowed after

24 Hours 0 Mins