Hi there, making a 2D movement war game similar to “Warfare 1917” on Armor games. Its the kind of game that you spawn in troops that move to the right and fight the AI enemy. Anyways, I have set the soldier pawn to move right when the game is started. However the soldier just falls while moving right, Ive disabled gravity in the pawn blueprint but it still falls. Not sure how to make the pawn be able to move up, down and right instead of falling. Ive looked online everywhere but could not find anything that works, I am sure the solution is simple and I am being an idiot. Any help would be appreciated.
Could you elaborate on what you’re doing? Because Pawns are not affected by gravity. You’d need to add script / components to make gravity work. Could we see the component hierarchy of that Pawn?
Apologies, I was originally using a pawn blueprint but it wasn’t falling nor moving so I tried using a character blueprint which is in the photo, should have mentioned that before hand. The only thing that I have in the Character Blueprint is making it move to the right (just as a test). The character falls down due to gravity and moves right when I need it just to move right without falling. I have temporarily set up invisible collision to stop the character from falling all the way down but it is not a sufficient solution as there will be multiple of these soldiers moving to the right.
- one way to do is to set the character movement component to Flying mode:
- setting gravity scale to 0 will also work:
- yet another way is to constrain the character plane movement:
All three should work here. And all three offer slightly different behaviour. Do try them all out!
On the other hand, judging by the art style and the design, I’d consider experimenting with an actual Pawn:
Much simpler setup than a fully blown character class. Again, your mileage may vary since you may need some more advanced features later on.
Good luck!
I will definitely experiment with a pawn class since there are going to be multiple on screen. This worked, thank you very much!