I am created a Pawn controller and I know I am missing one (probably simple) step and could use some help. I’ve looked at other answers and they don’t seem to work for what I need.
I am creating a side scrolling game in 3D (Locked to X/Z Plane) where the player moves like a helicopter, left and right across the screen as well as up and down. I created a BP Pawn class and to start with just have simple inputs (L/R-U/D) mapped to WASD. The Left/Right motion works as expected but the problem comes with Up/Down.
Gravity seems to be forced on the player even with “Enable Gravity” turned off on the mesh and capsule components. I still need it to react to physics for collisions (bumping into the ground, trees or cave roof) but I don’t want it to be stuck on the ground (like it currently is). Turning gravity scale to 0 seems like a bad idea and a hack vs a solution. I know the control inputs are correct from PrintString’s output so it’s puzzling with what to change.
My question then is, is there some other place that gravity needs to be turned off to have it not affect the Player Pawn so the player can kinematically move the character?
So I’ve gone a bit further with this and decided to try a different route with a DefaultPawn class and the Movement Component. This works to a degree except the default controls are not what I want.
To get what I want I need to use InputActions (since the old way is deprecated). What is not clear is how would I add the new IA system to a pawn with the Movement Component?
Thanks Hyanier for the suggestion. I had tried setting that value in the BP with no luck (which surprised me). I’ll try it with different Force settings to see if I can get a better result.
It looks like I have this solved for now at least. The Default Pawn with the Movement Component works for gameplay like this.
The one step I missed (and you can see it in the BP screenshot) is to set the Mapping Context in the node. Once I did that and turned off the default input, everything worked as expected.
@Hyaniner thanks for your help in some ideas to try.
@gviklund I’m really happy to see your success! This engine is huge, so sometimes it’s hard to find some clue. I’ve experienced similar things so many times like you.