How do you add a movement component to a pawn BP?

How do I add/change a movement component from a pawn in a BP?

MyPawn is based on Pawn → no native MovementComponent

I am trying to controll (click to movre right now) Pawn via Blueprints.
At first I was trying to possess the pawn myself and to move it around via click event but that didn’t work as expected.
Second I tried to use an AIController but move to location fails. Maybe because my pawn doesn’t have a movementcomponent. But I can only add a projectile or rotation component and not a character (native in character class) or flying (native in defaultpawn) component If I use teleport instead move to location my pawn works fine but I want it to move there not teleport.

2 Likes

someone have the solution of this problem?

I found out that there is no way to add a movement component to a normal Pawn via bluepints. But I also found out that the DefaultPawn class has one and is exaclty the class I was looking for

I haven’t found a solution for this yet either, but I’ve gone to simply extending DefaultPawn instead of Pawn for my non-character pawns. This should solve your problem, even if it’s not exactly what you’ve asked for, I suppose…

You’re correct that you can’t add a PawnMovementComponent in blueprints. Adding and extending movement components is really more for native code, where you might want to start from scratch and write your custom component or build off an existing one.

In Blueprints you can achieve a similar result by either starting with DefaultPawn (and FloatingPawnMovement) if you want that basic starting point, or you can simply create your own movement logic in the Tick event of your Pawn itself. The component itself is just a convenient location to group the movement variables and then the movement logic, but doing it within the Pawn itself is really no different in your case.

Since the character is a special case of pawn (i.e. inherits it’s behavior plus extended features that are not in Pawn) then you CAN’T use the character’s movement component so you need to write the logic by your own

,check the ball physics based content example it might help you !

, and to know if your pawn is on the ground you may want to check the Hit event and cast the output pin if it’s on the ground or not :slight_smile:

When will this be fixed? My physicaballBP pawn from the template would be broken then. I can’t access the is moving on ground node with out one. How do I make sure my pawn is on the ground with out this functionality?

I been wasting a bunch of time to get this to work. The work around for me was to use the hit event. Messing with audio times and stop/start i think i got it 95% as good as being able to access the proper movement components. The physics ball example was very lacking. I spent hours updating it. Great if you want a top down aspect. Not so great if you wanted a 3d marble world with camera controls. That was about 12 hours of work to make that work. Also I have to do this all in BP, i’m not a coder. Hence why Blue prints was so exciting cause it was going to fix all the flaws kismet had. I would say not having access to the movement nodes in the pawn bp is kind of lacking. Luckily there was a work around. While not optimal, it works. So on to the next phase. Thanks for the input.