Rigidbody2D dynamic make motionless for Rigidbody2D kinematic

I have a 2D game, all objects have a Rigidbody2D kinematic and a collider. I wish that I could not walk through some objects, but I couldn’t move them. That is, my player went up to the wall and rested against it. I tried to make the Rigidbody2D dynamic, but it is moving. In other attempts, I go through the object . Is it even possible to do this without changing the Rigidbody2D of the player?

There is my current Rigidbody which moving:
[182407-изображение-2021-06-21-184347.png|182407]

you should set all moving rigidbodies(especially those that are frictionless) to have continuous collision detection. the way collisions are detected on an update are as follows:

  • with discrete collision detection, the object is moved and then
    collisions are checked by seeing
    if the rigidbody’s colliders
    currently overlap with any other
    colliders after it has been moved
  • with continuous collision detection, unity looks to see if any colliders would have passed through any other colliders during on the way

when a moving object “collides with” another object, it is moved backwards so that it isnt colliding with it anymore, and its speed is reduced due to friction with the other object. if the object is frictionless, it will build up speed until it moves so far in the next frame that it misses the object entirely. TLDR: set the players collision detection to continuous