I’m trying to create a custom pawn from the DefaultPawn class that uses the FloatingMovement component.
I can’t seem to be able to override the input for that component, though.
Even if I check Consume Input when using keyboard/gamepad events directly or if I use the Enhanced Input system and crank up the priority of the input mapping context. The pawn always still moves e.g. up when pressing Gamepad Face Button Bottom (in addition to any other functionality that I have added.
Do I need to implement the movement completely from scratch without a Movement Component?
You’re trying to mix classic input with enhanced. Don’t do that.
Create an input action that will trigger the event and add it to the mapping context (or create a new context if needed and assign). Then use the event from the input action to trigger the print string.
Ah, sorry my post might have been confusing. I didn’t try to mix them, I just wanted to say I tried both.
But in any case I fixed it already, I found the “Add default movement bindings” option in the Pawn details and unchecked it. That was it and now I can implement my own movement there.
Controls for the Default Pawn are defined on the C++ level. Rather than using a default pawn, use just a Pawn and add a Floating Movement Component. This way you’re not inheriting anything and you stay in control.
Or use the setting you’ve found. But then who knows what else you’re inheriting! The component hierarchy, for sure - something you can no longer change.
A default pawn is a specialised pawn with extra stuff added: