"Use Flat Base For Floor Checks" makes player hover above ground in a Paper2d project

Hello everyone,

This is something that i have posted way back at official Paper2d thread (page 6) but i decided to post it here as well in hope that it will get a ticket for a future fix since it renders all paper2d games that use anything but a flat surface useless .

For time being is there any workaround to make my player walk properly when not on a flat surface?

Thank you.

Screenshot 2014-08-30 18.13.53.png

Hey ,

You can disable Use Flat Base for Floor Checks in Character Blueprint’s Defaults. It’s part of Character Movement component, so you can access it in game with a Get or Set attached to a Character Movement reference, in cases where you encounter sloped surfaces.

If you need a more elaborate setup, you can build something like what Middleton suggested here:

Hope that helps!

Thank you for your quick reply but i am not sure if i understood correctly your answer or one from Zac Middleton.
If i disable “Use Flat Base for Floor Checks” then my player when going downhill, is constantly losing touch with slope and thus he is triggering his “falling” animation.

I am stuck in a rather unfortunate situation where i can’t find any information about how to tackle this problem.
On my previous 2D engine what i did was to lerp rotate and lower origin point when i was on a slope and it worked perfectly.
Here i am not sure if i can do this real time through a blueprint when for example my player enters a trigger volume.

When i first started using Unreal i thought because it is a 3D engine and it has physics there would be a way for capsule component to follow ground and rotate a bit when going uphill or downhill but constrained because we are talking about 2D.Maybe i am very ahead of my self :slight_smile:

With your expertise is there a way to achieve above behavior ? Our players to lean forward or back just a bit but without losing touch with ground (while our flipbooks are aligned to slope like all platformers do, from rayman to super mario) and triggering all sorts of weird situations?

Sorry for but i don’t know if this sort of thing has been done before in unreal (2D) and without your guidance i don’t know where to start or what to do.

reason your character is falling is likely because you have platform angled at less than 45 degrees. You can adjust Walkable Floor Angle in Character Movement component; default is just under 45 degrees, so setting that a bit higher than you need for your platform should fix that issue.

For angling your character to ground, you can get angle of platform and adjust angle of your character actor accordingly. This may mess with Character Movement component some, so you might need to experiment with it a bit to get it working way you want for your game. I can’t think of many instances of this in 2D side-scrolllers, and Character Movement is designed for upright characters, but I think you can adjust it without too much trouble.

Thank you!

Just for future reference what did trick was not Walkable Floor Angle but Max Step Height.Had to adjust it a bit higher so it wouldn’t be so aggressive .

As for second part i agree with you that we do not need to mess with capsule itself since it might create some problems.Ideally you guys could add a way to move flipbook inside capsule.That way it would not cause any problems since it would be entirely cosmetic .