diff --git a/Assets/Scripts/Ingredient.cs b/Assets/Scripts/Ingredient.cs index 72f0154..1dde87c 100644 --- a/Assets/Scripts/Ingredient.cs +++ b/Assets/Scripts/Ingredient.cs @@ -17,13 +17,12 @@ public class Ingredient : MonoBehaviour DefaultPosition = transform.position; } - // Update is called once per frame void Update() { if (isMoving) { Vector3 mousePosition = Camera.main.ScreenToWorldPoint(Input.mousePosition); - transform.position = mousePosition; + transform.position = new Vector3(mousePosition.x, mousePosition.y, transform.position.z); } }