It seems as though the problem has to do with the
Vector2 playerVelocity = new Vector2 (moveInput.x,player , RigidBody.velocity.y);
The position y on the transform component of the Player increases/decreases exponentially and i am not sure what is causing this
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;
public class PlayerMovement : MonoBehaviour
{
Vector2 moveInput;
Rigidbody2D playerRigidBody;
[SerializeField] float movementMod;
void Start()
{
playerRigidBody = GetComponent<Rigidbody2D>();
}
void Update()
{
Run();
}
void OnMove(InputValue value)
{
moveInput = value.Get<Vector2>();
Debug.Log(moveInput);
}
void Run()
{
Vector2 playerVelocity = new Vector2 (moveInput.x , playerRigidBody.velocity.y);
playerRigidBody.velocity = playerVelocity*movementMod;
}
}