using UnityEngine; public class DropletMovement : MonoBehaviour { public float moveSpeed = 5f; private Rigidbody2D rb; private Vector2 movement; // Start is called once before the first execution of Update after the MonoBehaviour is created void Start() { rb = GetComponent(); } // Update is called once per frame void Update() { movement.x = Input.GetAxisRaw("Horizontal"); movement.y = Input.GetAxisRaw("Vertical"); } private void FixedUpdate() { rb.linearVelocity = movement.normalized * moveSpeed; } }