From b1848a9d5cde3aee17899f175c2fae0da056aa96 Mon Sep 17 00:00:00 2001 From: Ciakon Date: Mon, 29 Apr 2024 10:46:30 +0200 Subject: [PATCH] Fix --- Assets/Scripts/Ingredient.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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); } }