mirror of
https://github.com/Steffo99/beat-td.git
synced 2024-11-27 17:34:18 +00:00
11 lines
346 B
C#
11 lines
346 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class PositionFromMouse : MonoBehaviour {
|
|
|
|
void Update () {
|
|
Vector3 worldPosition = Camera.main.ScreenToWorldPoint(Input.mousePosition);
|
|
transform.position = new Vector3(worldPosition.x, worldPosition.y, transform.position.z);
|
|
}
|
|
}
|