So I tried experimenting with exposing the “FloatingPawnMovementComponent” to blueprints to see what I could make it do. I immediately got stuck…
The first thing I tried implementing on my new blueprints exposed movement component was to add a toggle-able and adjustable “gravity” setting. I tried doing this by adding a negative Z value to the movement component’s “Velocity” every tick. Next, I tried using the “AddInputVector” node, but again to no avail. The pawn just floats in the air, not affected in any way by either method.
So a few questions:
- Why doesn’t manipulating velocity work?
- How exactly does the AddInputVector node work?
- Any suggestions on how to apply gravity without “cheating”? (Meaning without using the set location functions)
Thanks in advanced!
Hmm…well isn’t the whole intention of using the 'floatingPawnMovementComponent" that you want it to NOT be subject to gravity? You already have access to adjusting gravity setting with regular character movement component so I’m not sure why you’d opt to use floating pawn to then try and add gravity to it? Maybe I just don’t understand
If ‘add impulse’ node is an option for the floating pawn then you could use it to apply your ‘gravity’ and have ‘Velocity Change’ checked. This won’t work nicely for multiplayer replication though.
Thanks for the reply!
Ill give the add impulse node a shot. Does it have to be applied to a physics body to work though?
Also, any idea why actually hard coding velocity isnt working?
As for why im fooling around with floatingpawn instead of character movement: well, its the only PAWN movement component with much of the back end stuff ready to go. I took a peek at the C++ and having “slides off surface” alreadt implemented along with the basics foe acceleration, max speed, braking already in is a big deal.
The CHARACTER movement component is excellent. And really the intention with this experiment is to eventually be able to recreate much of its functionality, but with PAWNs.