Last active
March 3, 2018 13:24
-
-
Save giljr/49b1665e63b022b6b70782c05c70fd73 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class Crosshair : MonoBehaviour { | |
// Use this for initialization | |
void Start () { | |
//hide the mouse cursor | |
Cursor.visible = false; | |
} | |
// Update is called once per frame | |
void Update () { | |
//make the mouse convas follows its position on screen | |
this.transform.position = Input.mousePosition; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment