Horrible Collison 2D --

Hello! So, I am making a simple platformer with basic movement (left, right, up)… I have my player (16x16 res.) with movement.cs script, collider 2d and rigidbody with mass 1 and gravity 1.

104976-ezgifcom-video-to-gif.gif

but the collison is terrible! First it goes in floor collider and than it slowly goes back.

What should i do to make it better? I already tried scaling it up but it doesnt help.

Full Movement Script:

void Start()
{
    rigid = gameObject.GetComponent<Rigidbody2D>();  
}
void Update () {
    isGrounded = Physics2D.OverlapCircle(groundCheck.position, radius,whatIsGround);
	if(Input.GetKey(KeyCode.A))
    {           
        if(-rigid.velocity.x <= speedLimit)
        {
            rigid.AddForce(Vector2.left * speed * Time.deltaTime);
        }
        //flip
        transform.localScale = new Vector2(-Mathf.Abs(transform.localScale.x), transform.localScale.y);
    }
    else if (Input.GetKey(KeyCode.D))
    {      
        if (rigid.velocity.x <= speedLimit)
        {
            rigid.AddForce(-Vector2.left * speed * Time.deltaTime);
        }
        //flip
        transform.localScale = new Vector2(Mathf.Abs(transform.localScale.x), transform.localScale.y);
    }

    if(Input.GetKeyDown(KeyCode.Space) && isGrounded)
    {
        rigid.velocity = new Vector2(rigid.velocity.x, jumpHeight);
    }

Thanks!

This is a wild guess but have you played with interpolation, at all? It seems like it’s exactly for this and their recommendation was specifically to have it be turned on for the main character and off for everything else.