How to get "Floating Pawn Movement" to work?

I can’t seem to get the floating pawn movement component to do anything. When I use “Add input vector” it does absolutely nothing. Setting the default velocity also does nothing. Is there a trick to get this working?

It should work straight away. Do you use “Add Input Vector” from Tick?

Nope I tested it with my currently working code that was using “Add World Offset” to move the character which was inefficient. Trying to get kinematic movement working on the pawn class without using C++

Can you show your actors blueprint script? You literally need just few nodes to make the actor move with floating pawn movement component.

1 Like

It’s a little bit of a ■■■■■■■■■■■ at the moment (Haven’t gotten around to commenting it yet haha), I can explain how it works if you can’t really understand what the code is doing.

http://i.imgur.com/hb2N98V.png

Even using the node like this does absolutely nothing at all

http://i.imgur.com/VstDaUO.png

1 Like

You sure your pawn receives input? Can you try the simple approach so that you just run it from Tick? If it still doesn’t move, then there’s something else wrong on your setup.

I seem to have found the source of the problem. I have a sort of “Custom Gravity” setup that is also adding input vector and it seems when i’m adding input on the Z axis I can’t manage to move on X or Y. Any ideas? When the gravity is off the input vector works

If I have this running at the same time as trying to move it gets really really slowed for some reason

http://i.imgur.com/hnH5AYr.png

you need to switch the pawns auto possess to player 0

For anyone else interested as this is an old thread and has no answer.

All you need to do is:

  • Create a Pawn
  • Add a collision (I added a collision box, the cubes are just visual and have no collision)
  • Set Collision on box to block all
  • Add the Floating Pawn Movement Component
  • Check which Floating Pawn Movements you want (walk, fly, crouch)
  • Then just use AddMovementInput like you do with any character.

If you want to use AddInputVector… remember gravity is -980 … so small values will not work if you want to manipulate the vectors though that method. Big numbers are required.

Or you can set the Velocity directly on the Floating Pawn Movement Component


5 Likes

In certain cases, you also have to change AutoPossessAI in the Pawn details. For example, in my case, had to put ‘Spawned’ because of how I created the Pawns. Without it, the movement component is kind of deactivated. Took me a while to figure that one out :stuck_out_tongue:

Also make sure that the pawn has any controller

Reminder as it took to much time to figure out myself. In actor details Pawn Make sure Auto Possess AI is “Placed In World or Spawned”. Add input vector to tick give it any random value and it should work