I am making a top down shooter game and I was wondering if there was a way to move the crosshair smoothly while still having pixel perfect movement. I am using the pixel perfect camera component.
This script drag onto your UI cursor in Canvas.
using UnityEngine;
public class Crosshair : MonoBehaviour
{
void Start()
{
Cursor.visible = false;
}
void Update()
{
transform.position = Input.mousePosition;
}
}