It seems that every single time I try to develop a 2D sidescrolling game, the biggest (and first) problem I encounter, is always the physics. This is mostly due to me needing very specific physics, and not ones that are commonly used.
I have tried using a rigidbody, and playing around with all the settings possible, but that just didn’t work in the slightest. I even tried using the code from Sebastian Lague, which for those who don’t know, is insanely well made, and is practically a whole physics engine on it’s own. But there are problems I have with how it works, and due to it’s complexity, I can’t take it apart and leave the stuff I need, without breaking the whole thing.
Here’s exactly what i need from my character controller:
- Has to have solid/rigid/static movement, meaning no smoothing whatsoever (instantly rigidbody is not suitable).
- It has to be able to climb slopes, and move on them at the same speed as on flat ground. And also be able to stay on them when nothing is being pressed (not slide down).
And so far, that seems to be all I need for the base of the controller. Yet it seems impossible to achieve with the inbuilt Unity physics engine, and therefore, without having a whole lot of code for a custom physics engine.
From my experience using built-in Unity physics, the CharacterController component would most likely be exactly what I need. But clearly there’s no “2D” version available in the Editor. I’ve seen some people talk about a 2D version being available, but I’m not sure how up-to-date that is, and how reliable it is.
Just a note, I am not an expert programmer. I wouldn’t even consider myself a “good” programmer. I can get around a lot of stuff, but I don’t have a single clue when it comes to actually making your own physics. And what I’m trying to achieve seems really basic (in the concept), but really complex (in the way physics work). So I’m honestly completely stuck.