Ridgidbody cube

So my issue today is that my cube wont accelerate properly… is there any pointers or tips I could have???

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

[RequireComponent(typeof(Rigidbody))]
public class Player : MonoBehaviour
{
    public float movementSpeed;
    private float movementSpeedMaximum = 4f;

    Rigidbody playerRigidbody;

    Vector3 movement;

    // Start is called before the first frame update
    void Start()
    {
        playerRigidbody = GetComponent<Rigidbody>();
    }

    void FixedUpdate()
    {
        movement.x = Input.GetAxisRaw("Horizontal");
        movement.z = Input.GetAxisRaw("Vertical");

        movement = new Vector3(movement.x, 0, movement.z).normalized;

        if(playerRigidbody.velocity.magnitude < movementSpeedMaximum)
        {
            playerRigidbody.AddForce(movement * movementSpeed);
        }
    }
}

I am guessing the Cube is not moving at all? That may be because the “force” multiplier you are using is too low. You have named that variable as Movement Speed when it is in fact Force Magnitude Multiplier.

A good way to have a responsive character that is still force driven, but kinda good to control is to crank up the ForceMagnitude for movement to like 1000 or something, but also set the DRAG in Rigidbody properties to something like 500. This way it accelerates to max speed quickly, and automatically decelerates. This works well in 2D, but in 3D that drag will also affect you jumping so it becomes tricky.

Try that. And ofcourse you can simply set the Rigidbody’s velocity directly as well, but that means your player may simply cancel any force that is applied to it, as the next frame it will immediately snap to a value determined by input.