Avoid character bouncing off of obstacles

Hello, I’m currently working on a simple platformer game to learn using Unity (since I’m fairly new to this tool and to its scripting, I’m using C# at the moment).

I made a script for character movement and jumping (I prefer making it myself rather than using anything that comes with the software). However, when the character encounters an obstacle it awkwardly bounces off, I’d like to avoid that, just a simple stop on collision. So I’m wondering how to do it, maybe make a check if there is a collision with anything else than the floor and if so, stop movement?

You can try using a Character Controller to move your character, add it from Component > Physics > Character Controller

After you add it you can access it by:

CharacterController controller;
    void Start() {
    controller = GetComponent<CharacterController>();

    //..etc
    }
    
    void Update() {
    controller.Move(/*use your motion Vector3 Here*/);
    //..etc
    }

Good luck