Rogue Squadron type player controller?

I am trying to wrap my head around how to make a player controller similar to how flying worked in the old Rogue Squadron type games.

I’m trying to take controller input and use the left stick’s up/down axis to control pitch and the right/left for yaw. When the player spawns, have the character moving at a predetermined speed forward relative to it’s local direction that can be increased and decreased with the triggers on the gamepad. I keep trying to think it through and prototype it out, but it never works. Also, is there a way to turn off gravity for a component until it is triggered?

Thanks in advance.

There’s a level inside the Content Exemples pack (free off the marketplace) that contains a controllable flying UFO. You could probably learn something from how that one was put together. The level that contains it is called “Blueprint_Input_Examples.umap”. I believe it’s the last example inside it.

I took a look and it has helped somewhat, but it is overwhelming to try and look through all the scripting used for all the movement.

I’ve successfully edited it to use a constant velocity instead of based on the stick input, but is there an easy list or screenshot someone could compile for me to take a look at that would simplify things down even further?

Basically, if I think it through, this is what I think the flow would be like:

Camera uses a spring arm to connect to ship.
Camera tilt and pan based on input, ship then follows that vector at constant speed.

I guess it seems like I’m thinking too simply. I’ve looked through the documentation provided by Epic, but it seems to be somewhat minimal at the moment.

We want to add a simple ‘flying’ template in the next release! Hopefully that will help. One way to do it (without using the physics engine) is:

  • Make a new Pawn BP based on Pawn (not Character, you are not walking)
  • Add a variable that represents your speed
  • Using a Tick event, move forwards each frame by (deltatime * speed * forward vector)
  • Use stick X to add a local yaw to the ship
  • Use stick Y to add a local pitch to the ship

Hey, I just finished prototyping something a little similar to what you’re describing (Not including static forces like you’re describing, but just using basic inputs. As its first person there’s no camera controls, but you could probably use something similar in defining vectors or such. It pretty well does what was described by James above me, minus the modifying factors (Add in a vector * float multiplication for the speed + multiply it by delta time if need be). The input axis should be easily editable in Edit>Project Settings>Input. As for Gravity, that can be toggled/set easily, just right click and search for ‘gravity’. :slight_smile:

https://dl.dropboxusercontent.com/u/17693891/Temp_Example.png


I didn’t even think of moving forward each frame using deltatime! I don’t know why, as that’s what I used in Unity for movement. Thanks James and Sivuden.

I tried following JamesG’s example, but it doesn’t seem to be working. Shouldn’t the object simply be moving forward with this blueprint?

http://puu.sh/7JPsY/22248c3cbc.png

Don’t use ‘Add Movement Input’ if you are doing the movement yourself. Instead you want to use something like Set Actor Location. I just tried this and it worked: