Continuous Forward Movement

I’m creating a level for a game where the player will be constantly moving forward in a flying object. They will have a target ahead of them which is doing the same which they will move left and right to shoot at. Left and right movement will be limited (I was thinking I could do this with a blocking volume).

I’m not sure where to start on coding them to continuously move forward though. There’s a specific Sega or Nintendo game which is based on this but it’s slipping my mind right now. Off the top, a brief example could be the Hog Wild level from Crash Bandicoot, the way the player is always moving forward with limited left and right movements.

I’m thinking this would be a case of locking the Z axis, and restricting the X axis (just incase those are wrong, the up and down axis and left and right axis). Then some form of code to create a continuous forward movement (along the Y axis I believe).

Apologies if this is vague, which it is, but I’d really appreciate anyone at least trying to help. I’ll answer any questions because maybe you guys can help me explain what I’m failing to say a bit better haha.

Are you using Add Movement Input?

There is a pin called Force, once true, it will continuously move the character to that direction.

I believe i tried Add Movement and wasn’t 100% sure of how to get it working. I will try your suggestion and let you know the results. Thanks for replying mate.

I’m really struggling to kick off using add movement. I haven’t had a lot of experience with actor blueprints before so I really don’t know where to start.

Here’s the example I was thinking off before. Forgetting all the complex stuff, having the player fly forwards with the ability to navigate left and is what I’m looking for.

Just in case anyone ever searches for this, what I wanted was relatively easy. I haven’t got as far as the video above but in general I have been able to solve the continuous forward movement.

Using the Third Person template, go to the Movement Input section within the My Character blueprint.

From there, replace InputAxis MoveForward with an Event Tick. Plug the the white to the white on Add Movement Input and leave the Delta Seconds clear. This will make your character run endlessly forward.

I have done some edits like changing the pawn to a plane and gave the enemy the same settings. Now I’m just working on giving the enemy AI to move slightly left and right and to add a damage calculator onto it.

I’m doing something very similar to this. My game is a motorbike game in which the player can never fully stop. I want for enemy bikes to always move forward too, but to be able to slow down and speed up to keep up with the Player. They also need to move left and right and use pathfinding to avoid traffic. Any chance I can look at your work to see if it helps?

Since it was like a year ago, I dunno if I’d remember it off the top and I imagine the files long gone.

In my new university course, we start on UE4 I believe in about a week or two. When I get it redownloaded and fired up, I’ll try to recreate the code for it and let you know how I get on. If I can get it working, I’ll send you a file or something. You know yourself, once you stop using the software for a few months it’s like going back to square one all over again :frowning: