Hello, I have been starting to programm just a short time ago, and I'm creating my first own Game: Jump And Run ( 2D ), and I wanted to ask how I can prevent that the Playerobject spins around?,Hello,

void Update()
{
float xEingabe = Input.GetAxis(“Horizontal”);
float yEingabe = Input.GetAxis(“Vertical”);
if (yEingabe < 0)
{
return;
}

    float xNeu = transform.position.x +
        xEingabe * eingabeFaktor * Time.deltaTime;
    if (xNeu > 8.3f)
    {
        xNeu = 8.3f;
    }
    if (xNeu < -8.3f)
    {
        xNeu = -8.3f;
    }
    float yNeu = transform.position.y +
        yEingabe * eingabeFaktor * Time.deltaTime;
    if (yNeu < -5)
    {
        yNeu = -4.4f;
    }
    transform.position = new Vector3(xNeu, yNeu, 0);

,

Oh, sorry, if I didn’t describet it clearly enough. The gamObject didn’t spin around every time, but it spins around, if you don’t come with the complete lower side on a Plattform.