Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- public class circleScript : MonoBehaviour {
- // Use this for initialization
- void Start () {
- }
- // Update is called once per frame
- void Update () {
- if (Input.touchCount > 0 && Input.GetTouch (0).phase == TouchPhase.Began) {
- Vector3 touchWorldPoint = Camera.main.ScreenToWorldPoint (Input.GetTouch (0).position);
- touchWorldPoint.z = 0f;
- RaycastHit2D hit = Physics2D.Raycast (touchWorldPoint, -Vector2.up);
- if (hit) {
- Debug.Log("hoynay");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement