Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

2D Isometric Rigid Body Collision Resolution (sliding after collision) Not Working

Discussion in 'Physics' started by errandel, Jul 3, 2019.

  1. errandel

    errandel

    Joined:
    Jul 3, 2019
    Posts:
    1
    Hi Unity Experts,

    I want to preface this by saying I'm totally new to Unity, so please excuse my ignorance.

    I've been following the "Isometric 2D Environments with Tilemap tutorial" (linked embedded in text) that was on the blog earlier this year. One thing I noticed right away after importing the "demo project" (linked embedded in text) was the collision resolution is a bit wonky.

    When running directly at a wall (up + left, or up + right etc), where wall surface's normal and my character normal are opposite, the character stops moving. This is correct and is intended behavior.
    Here's a picture to clarify what it looks like when up + left is pressed:


    Now, when moving diagonally pressing only a single button (up or left or right or down), I noticed that the character will slide very very slowly if up or down is pressed.
    Here is a picture to clarify what it looks like when up is pressed:


    When pressing left or right, the walling collision sliding happens very smoothly, while the character is basically stuck when colliding on a wall when up or down is pressed.

    Can someone please point out the cause of the this problem, and show me how to fix it?

    Thanks for the help, I really appreciate it!
     
unityunity