So me and a friend is making a 2D game in Unity3D for a school project and I’m in charge of scripting the character controller for our game.
What I did at first was to use translate in order to make the character move, it worked well enough in the beginning however it was a bit too buggy since the character bugged into the walls and jumped back out so I changed it to use rigidbody2D.velocity instead, it fixed the wall bugging and does feel a lot more smooth overall however if I move to the side in the air while hitting a wall I stop going down and get stuck in the wall until I let go of the move button or move the opposite way.
Changing the move part from translate to velocity also screwed with the simple wall run I had implemented but I think it has to do with the character getting stuck in the wall.
If I could get some help on how to make 2D velocity work in a good way or maybe just some tips and tricks I would be really grateful since I’m a bit stuck at the moment.
I don’t currently have the script on me but I can get it soon.
Also, if this is the wrong place to post this in then I could probably move it, or maybe if there is a nice mod out there who could do that
Obviously, you’ll want to move that to another function to call from Update so your update function doesn’t have so much clutter in it, but here’s the idea.
Well, I fixed it. I added a Physics material with no fricition to my walls and now he falls down as he should and the rest in my movement script works!