From 8c5690e35186247895781e7c7eee3fc3693a3d9f Mon Sep 17 00:00:00 2001 From: Ciakon Date: Sat, 27 Apr 2024 14:31:39 +0200 Subject: [PATCH] nah, wtf --- Assets/Scripts/Cooking.cs | 1 + Assets/Scripts/Ingredient.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Assets/Scripts/Cooking.cs b/Assets/Scripts/Cooking.cs index af77631..c54edd5 100644 --- a/Assets/Scripts/Cooking.cs +++ b/Assets/Scripts/Cooking.cs @@ -143,6 +143,7 @@ public class Cooking : MonoBehaviour // Keep track of ingredients going on and off the cooker. List currentCollisions = new List (); + private void OnTriggerEnter2D(Collider2D other) { currentCollisions.Add (other.gameObject); } diff --git a/Assets/Scripts/Ingredient.cs b/Assets/Scripts/Ingredient.cs index dcf4530..72f0154 100644 --- a/Assets/Scripts/Ingredient.cs +++ b/Assets/Scripts/Ingredient.cs @@ -23,7 +23,7 @@ public class Ingredient : MonoBehaviour if (isMoving) { Vector3 mousePosition = Camera.main.ScreenToWorldPoint(Input.mousePosition); - transform.position = new Vector3 (mousePosition.x, mousePosition.y, transform.position.z); + transform.position = mousePosition; } }