0
0
Unityframework~20 mins

Why 3D expands game possibilities in Unity - Challenge Your Understanding

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
3D Game Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
Predict Output
intermediate
2:00remaining
3D Object Movement Output

What will be the output of the following Unity C# script when attached to a 3D object?

using UnityEngine;

public class MoveObject : MonoBehaviour {
    void Start() {
        transform.position = new Vector3(1, 2, 3);
        Debug.Log(transform.position);
    }
}
Unity
using UnityEngine;

public class MoveObject : MonoBehaviour {
    void Start() {
        transform.position = new Vector3(1, 2, 3);
        Debug.Log(transform.position);
    }
}
A(1, 2)
B(1.0, 2.0, 3.0)
CVector3(1, 2, 3)
DError: transform.position is read-only
Attempts:
2 left
💡 Hint

Check how Vector3 is printed in Unity's Debug.Log.

🧠 Conceptual
intermediate
1:30remaining
Why 3D Allows More Game Possibilities

Which of the following best explains why 3D expands game possibilities compared to 2D?

A3D allows movement and interaction along three axes, enabling more complex environments and gameplay.
B3D games always run faster than 2D games.
C3D games use fewer resources than 2D games.
D3D games do not require physics engines.
Attempts:
2 left
💡 Hint

Think about how adding depth changes player movement and game design.

🔧 Debug
advanced
2:30remaining
Fix the 3D Rotation Bug

What error will occur when running this Unity C# code to rotate a 3D object?

using UnityEngine;

public class RotateObject : MonoBehaviour {
    void Update() {
        transform.Rotate(0, 90, 0 * Time.deltaTime);
    }
}
Unity
using UnityEngine;

public class RotateObject : MonoBehaviour {
    void Update() {
        transform.Rotate(0, 90, 0 * Time.deltaTime);
    }
}
AThe object rotates too fast because Time.deltaTime is not applied correctly.
BSyntaxError: Missing semicolon after Rotate method call.
CRuntime error: transform.Rotate does not accept three arguments.
DThe object does not rotate because the z-axis rotation is zero.
Attempts:
2 left
💡 Hint

Look carefully at how multiplication with Time.deltaTime is applied.

📝 Syntax
advanced
1:30remaining
Identify the Syntax Error in 3D Vector Initialization

Which option contains a syntax error when initializing a Vector3 in Unity C#?

AVector3 pos = new Vector3(1f, 2f, 3f);
BVector3 pos = new Vector3(x:1, y:2, z:3);
CVector3 pos = Vector3(1, 2, 3);
DVector3 pos = new Vector3(1, 2, 3);
Attempts:
2 left
💡 Hint

Remember how to properly create new objects in C#.

🚀 Application
expert
3:00remaining
Calculate Distance in 3D Space

Given two points in 3D space, pointA = (1, 2, 3) and pointB = (4, 6, 8), which code snippet correctly calculates the distance between them in Unity C#?

Afloat dist = (pointB - pointA).Length();
Bfloat dist = Mathf.Sqrt((4-1)+(6-2)+(8-3));
Cfloat dist = Vector3.Magnitude(pointB - pointA);
Dfloat dist = Vector3.Distance(pointA, pointB);
Attempts:
2 left
💡 Hint

Check Unity's built-in methods for distance calculation.