I am putting together a 2D game, and I was wondering if there is a way to 'square off' the character controller so that it doesn't slide off square platforms?
If not, am I best to make my own Character Controller script and apply some kind of rigid body to it?
CharacterController seems to be capsule only, you'd have to use a BoxCollider instead.
If BC lacks any features of CC that you need - extend it with scripts.
Do you mean from sliding off towards/ away from the screen (on the z-axis) or on the x-axis? If it's sliding of the z-axis you could just manually override the z position in the update of a script to keep it from changing, otherwise (if it's sliding along the x) the problem is likely the collider on the character or the platform rather than the script.
I know this thread is long dead but does anyone have any tips on how to combat this 2d platform problem? I’m getting the same results as in the video when my character nears the edge of a platform…