0
0
Unityframework~5 mins

Touch input basics in Unity - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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?
AInput.touchCount
BInput.touchPosition
CTouch.fingerId
DTouch.phase
What does TouchPhase.Moved indicate?
AA finger just touched the screen
BA finger moved on the screen
CA finger was lifted off the screen
DNo finger is touching the screen
How do you access the position of the first touch on the screen?
AInput.touchCount.position
BInput.touchPosition[0]
CTouch.position[0]
DInput.GetTouch(0).position
What is the purpose of fingerId in a Touch object?
ATo identify the finger across frames
BTo get the finger's pressure
CTo get the finger's speed
DTo get the finger's color
Which TouchPhase means the finger was lifted off the screen this frame?
ATouchPhase.Began
BTouchPhase.Stationary
CTouchPhase.Ended
DTouchPhase.Canceled
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.