HeavenStudio/Assets/Scripts/Common/FollowMouse.cs
2022-01-09 18:35:55 -05:00

15 lines
363 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace RhythmHeavenMania.Common
{
public class FollowMouse : MonoBehaviour
{
private void Update()
{
var pos = Camera.main.ScreenToWorldPoint(Input.mousePosition);
transform.position = new Vector3(pos.x, pos.y, 0);
}
}
}