using UnityEngine;
using System.Collections;
public class Character_movement : MonoBehaviour
{
public GameObject Player;
void Update()
{
foreach (Touch t in Input.touches)
{
Ray ray = GetComponent<Camera>().ScreenPointToRay(t.position);
RaycastHit hit;
Debug.Log("s");
if (Physics.Raycast(ray, out hit))
{
GameObject thing = hit.transform.gameObject;
if (Touch.phase == TouchPhase.Began)
{
}
}
}
}
Here is what I got so far. I’m trying to make a small ball go to a pad when you tap it but how do I do that?