My character is going through walls

,

Hi yall, new to the forums so apologies if this is in the wrong spot or formatted poorly. I have a character set up with a Rigidbody 2D and a Circle Collider 2D for movement and character collision. I have a composite collider 2d on my tilemap header and a Rigidbody 2D with Kinematic body type, and box collider 2d on the individual environment pieces. Here is when the problem comes up when traveling at speeds lower than max and hitting the wall, the character will collide into as normal, but when traveling at max speed at the wall, the character will move into the wall and will get stuck. (Worth a note that I am able to get out of the wall at any time)

I am getting one error message

  • UnassignedReferenceException: The variable rb of PlayerController has not been assigned.
    You probably need to assign the rb variable of the PlayerController script in the inspector.
    UnityEngine.Rigidbody2D.set_velocity (UnityEngine.Vector2 value) (at <65cab14ac59e4552b77f98a4aed18f9e>:0)
    PlayerController.Move () (at Assets/Scripts/PlayerController.cs:42)
    PlayerController.Update () (at Assets/Scripts/PlayerController.cs:31)

Please let me know if I am missing anything that might help solve my problem.

Thanks in advance,

-Andreas

I found a fix, I changed the collision detection from discrete to continuous