Problem with add movement input

I want to build auto movement forward by add movemnt input, but it doesnt work. the setActorLocation works properly.
What is the problem?

Could you please post a screenshot of it not working?

and it doesnt move

what should i do?

Add FloatingPawnMovement component to your Pawn:



thank you a lot

solution worked for me, but after adding floating pawn movement component, also needed to check ‘can walk’ in ‘movement capabilities’ of ‘floating pawn movement’ component.

For anyone else stopping by, it is important to note that when you “simulate physics” on a character bp with character movement component the engine hands control over to the physics and disables the character input (at least so I am told). This was my issue, had to find another way other than simulate physics all the time in that character.

EDIT: So I am positive now that simulating physics on a character all the time can cause several types of components to stop functioning properly or even entirely…even without any errors showing (such as floating pawn movement, character movement, and some aspects of pawn sensing components and possibly others).

The solution I used is that I have two different types of enemies. I have pawn based enemies and physics based enemies. If you plan on using behavior trees on physics based actors, you will need to use physics based scripting to cause the actor to react to its behavior tree. For example I have a physics based actor that goes to random points on a navmesh every 10 seconds and finds new points to go to.

When a new point is generated it creates a path, and then applies forces (physics based) to move the actor to each point along its navmesh path sequentially to accomplish it’s end goal of reaching the last point, no character movement component is used (because its a physics based actor). Just remember if you want to use a pawn system and use movement components (much easier for complex behavior imo) then don’t simulate physics all the time… you can always turn simulate physics on a pawn based character like that for death ragdoll and things like that, just bare in mind the character movement component will disable as soon as the physics gets enabled on the skeletal mesh.

In laymen’s terms I think it works simply like this…physics is essentially its own “controller” of the skeletal mesh. Once enabled, physics calculations govern how it is going to move around. If disabled…then other things can tell it how to move around (ex Character Movement Component)…not both at the same time. I’m open to any more info if someone finds my understanding flawed. Thanks!

1 Like