Stop losing forward velocity when moving sideways

Hello, my name is Seif and i am currently making a game where the player is a simple shaped motorcycle. The motorcycle is always moving forward, but the player can move it side ways by pressing “d” or “s”. The problem is that when the player moves sideways, he loses his forward velocity and the motorcycle becomes slower-are there any workarounds to that? I have looked around but couldn’t find a good answer, or an answer that i could implement;i am very new to ue4.
I’m using “Add movement input” for movement and the character class for my player.
Thank you.

When you said the motorcycle is always moving forward, is this happening on a Tick event? You can check out the [Blueprint Endless Runner series here][1], where the character can dodge but is always moving forward on Tick. However, for a vehicle, you might be better looking at [the vehicle series][2] (which is quite old), or just use the vehicle project templates: File > New Project

I hope this helps!

-Adam
[1]: https://docs.unrealengine.com/latest/INT/Videos/
[2]: https://docs.unrealengine.com/latest/INT/Videos/Vehicles/index.html

Try using AddActorLocalOffset for the side move. For example:

317621-1.jpg

I have this problem too! I am trying to make a game similar to this but my character loses forward velocity when moving forward. I made a workaround where i increase the movement speed when moving to the side, but this solution is full of bugs and consumes a lot of performance. I hope someone finds a solution!

Thank you! This solved the problem. The only thing ive noticed is that when moving fast to the side, the player can sometimes go through blocking volumes. Do you have any idea why?

What else you can do is:

  1. Set your character Max Speed 1.414 times higher than it is now;
  2. Multiply both axis values by 0.7071 before adding movement input;

This way your forward velocity will stay the same, and sideways velocity will be added to it.

Check Sweep.