Apply Force/Velocity/Impulse/etc. to TwinStickPawn?

(Disclaimer: I am very, very new to UE4, so I may not understand some things immediately or know certain terminology)

I am currently trying to change how the TwinStickPawn from the Twin Stick Shooter example map moves, which so far has involved changing the Pawn’s blueprint so that it no longer moves with WASD/left stick or shoots with directional keys/right stick.

I have managed to make it so that it is always facing towards the mouse and shoots towards it (ie. where it is facing) when LMB is held down, but next I would like to change it so that it also gradually accelerates to a top speed in the opposite direction of the mouse when LMB is held down.

I have so far gotten it to simulate physics with linear/angular dampening and gravity while constraining it to the XY plane (since it is top-down), but beyond that, every attempt I have made to apply some sort of propulsion to it has not worked out. I have so far tried thrusters, launching the pawn, setting velocity, adding impulse, in accordance to the suggestions from other posts on the AnswerHub but none of them seem to have any effect.

Is this something more to do with the specific pawn from the Twin Stick Shooter example? I may have to start from scratch, as this template seems to have a weird interaction with physics and gravity. I will continue looking for answers in the meantime!

I’ve never played with the twin stick shooter but I think Add Impulse is probably the way to go. Make sure your vector is correct (try shoot it upwards via Z axis first).

I would seriously advise you to look at every templates but start from scratch and learn the ropes. You may feel like it’s slower but in the long run, you will get a much better understanding of the engine and you will be able to make far many more game genres quickly.

I ended up taking your advice and starting from scratch, using a tutorial to create a map, character pawn, etc. from scratch.

I was not able to get the Add Impulse to work (although I’m not sure if I need to add a specific component for it), but Launch Character seems to have done the trick. I’ve used the below blueprint to gradually add velocity to the character (which is still limited to the X/Y plane) as long as LMB is held.

Although, another problem I’ve run into is getting it to slow to a stop. It seems this would be managed by causing the character’s root (in this case, the collision capsule) to simulate physics and add linear and angular damping, although when I try this, the character simply won’t move. I’m not sure if this is a problem with simulating physics on the collision capsule (which cannot be removed from the root), however when I try it with any other components - in this case, a sphere and a cone - they simply disappear upon pressing play.

The character should still move with physics on, maybe you need way higher values. Always helps to try shoot upwards to start with.

And for the slow down it’s really about the dampening of the speed, using character movements settings such as Ground Friction.

I tried messing with some of the values at first (both object mass and velocity added), although I’ve found that the only way it will move is with Gravity on and constraints off - and even then, it just starts spinning rapidly if it turns even a little (I am using mouselook too, so it should only ever be facing the cursor).

Is there a way to get CharacterMovement to work with a character that is constrained to the XY plane? I think if I can get that working, all the other problems should fall into place.