Recall & Review
beginner
What is a Touch in Unity?
A Touch represents a single finger touching the screen. It contains information like position, phase (start, move, end), and finger ID.
Click to reveal answer
beginner
How do you check if the screen is being touched in Unity?
Use
Input.touchCount. If it is greater than zero, the screen has one or more touches.Click to reveal answer
beginner
What does
TouchPhase.Began mean?It means a finger just touched the screen this frame. It's the start of a touch.
Click to reveal answer
beginner
How can you get the position of a touch on the screen?
Use
touch.position, which gives the x and y coordinates in pixels from the bottom-left corner.Click to reveal answer
intermediate
Why is
fingerId important in touch input?fingerId helps track individual fingers across frames, so you know which touch is which when multiple fingers are on the screen.Click to reveal answer
Which property tells you how many fingers are currently touching the screen?
✗ Incorrect
Input.touchCount returns the number of active touches on the screen.
What does
TouchPhase.Moved indicate?✗ Incorrect
TouchPhase.Moved means the finger has moved since the last frame.
How do you access the position of the first touch on the screen?
✗ Incorrect
Input.GetTouch(0) gets the first touch, and .position gives its screen coordinates.
What is the purpose of
fingerId in a Touch object?✗ Incorrect
fingerId uniquely identifies each finger touching the screen so you can track it over time.
Which TouchPhase means the finger was lifted off the screen this frame?
✗ Incorrect
TouchPhase.Ended means the finger stopped touching the screen this frame.
Explain how you would detect a single tap on the screen using Unity's touch input.
Think about checking if a finger just touched the screen and where.
You got /4 concepts.
Describe the role of the TouchPhase property and list its main states.
TouchPhase tells you what is happening with a finger each frame.
You got /6 concepts.