Q21.webp
T

Q21.webp

Kizspy | Question: 21
(Choose 1 answer)
What does this script do?
using UnityEngine;
public class TouchRaycast: MonoBehaviour {
void Update() {
if (Input.touchCount > 0 && Input.GetTouch(0).phase == TouchPhase. Began) {
Ray ray = Camera.main.ScreenPointToRay (Input.GetTouch(0));
if (Physics. Raycast(ray)) {
Debug.Log("Hit something!");
A. Detects initial touch input and logs raycast hits on scene objects
B. Relocates the GameObject based on touch position coordinates
C. Alters the GameObject's color upon touch detection
D. Initiates an animation sequence on touch interaction

Thông tin

Category
FGU301
Thêm bởi
thuyhoa276
Ngày thêm
Lượt xem
204
Lượt bình luận
1
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom