How can I change the movement of my character?


Basically what I need is to have a blueprint of a character that at spawn, has no velocity and is not affected by gravity.
I want to be able to press the left mouse button and have my character move at high velocity toward where I was aiming at, and then lose all velocity as soon as a collision happens.

How would I make the blueprint for this type of movement? I tried using the add movement input along with 0 in the gravity scale of the default character but it just doesnt work…


have you put Air control to 1 ?

Well it’s not really AIR control I want, I want to disable every type of movement (No WASD), expect moving in the direction of where im aiming when I input left mouse button.

Basically it would go like this

-Player Aim
-Player press Left mouse button
-Player is launched forward (Toward where he was aiming) at high speed
-Player stop moving upon colision

Nothing other than that. No gravity, no falling down. Just straight point and clicking.

Get your CharacterMovementComponent, and set mode to flying.

Detect you Left Mouse if it click toggle some value, then in Tick keep update AddMovmentInput. Direction will be ControllRotation Forward Vector.

When released mouse turn off that value to stop fly forward. Remember to put value to Braking Deceleration Flying, so it will deceleration will you stop add input.

Thanks! It works pretty great, and its good enough for prototyping, altough do you think there could be a way to make it less relying on Pressing and depressing?
Like basically, just clicking toward somewhere sends the player flying at a certain speed UNTIL a collision happen in which everymovement is instantly stopped BY the collision (And not by me depressing left mouse)

But thanks it’s already something!

you can add event OnActorOverlap, when this event occur you can turn off Move value, so it won’t add movement value any more.

Thanks again! As I said it’s perfect for prototyping.

But the final version of this would require that once I ‘‘Dash’’, the player gets stuck in that direction until a hit happens. But I want to be able to spin my camera around without changing my direction. Basically, instead of ticking every second for the player controller rotation, only take it into account BEFORE the fire input is made. How would I do that?