mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-12 08:47:37 +02:00
Drag n drop begun
This commit is contained in:
@ -6,10 +6,12 @@ namespace RhythmHeavenMania.Common
|
||||
{
|
||||
public class FollowMouse : MonoBehaviour
|
||||
{
|
||||
public Vector2 offset;
|
||||
|
||||
private void Update()
|
||||
{
|
||||
var pos = Camera.main.ScreenToWorldPoint(Input.mousePosition);
|
||||
transform.position = new Vector3(pos.x, pos.y, 0);
|
||||
transform.position = new Vector3(pos.x - offset.x, pos.y - offset.y, 0);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user