2D RPG MOVEMENT

Hi! I have a problem with character movement. He goes through the walls and other items with colliders. Character has rigidbody and collider, i turn dynemic and turn gravity to 0. So what's the problem?

using System.Collections;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using UnityEngine;

public class Player_move : MonoBehaviour
{
    public Rigidbody2D rb;
    private Vector3 targetPosition;
    float speedLimit = 0.7f;
    public float speed = 5f;



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

    // Update is called once per frame
    void Update()
    {
        targetPosition.x = Input.GetAxisRaw("Horizontal");
        targetPosition.y = Input.GetAxisRaw("Vertical");




    }

    private void FixedUpdate()
    {
        if(targetPosition.x != 0|| targetPosition.y != 0)
        {
            if(targetPosition.x != 0 && targetPosition.y != 0)
            {
                targetPosition.x *= speedLimit;  // limit the speed whn we press two buttons
                targetPosition.y *= speedLimit;
            }




            rb.velocity = new Vector2(targetPosition.x * speed, targetPosition.y *speed);



        }
        else
        {
            rb.velocity = new Vector2(0f,0f);
        }
    }

    private void OnTriggerEnter2D(Collider2D collision)
    {
        if (collision.CompareTag("interior"))
        {

        }
    }

}

9843675--1416465--ds.png

I see you have a trigger callback. Did you mark the colliders as trigger? If so they won't block movement.