switching between movement logic (6dof and WASD third person walking)

Hello! After tons of googling and forum searching I can’t seem to find anything to help me. I’m fairly new to Unreal and programming in general, just as a heads up. I finished the 6DOF tutorial and added a lot of my own movement logic (and controller input) as well, and a way to switch between them (basically just turning off and on physics simulation). But the problem is that turning the physics simulation back off doesn’t completely change the movement logic back to normal (which I expected).

What is normal is running forward, but that’s mostly it. Running any other direction works but only if I hold the analog/wasd key in that direction the whole time, otherwise the camera and character turn back towards the north like it’s a default position. Also the right analog/mouse are still connected to the flying logic, changing the roll and pitch though I stay on the ground, but the character does flips and whatnot. I expected this too because there’s nothing actually telling it to only use the regular movement logic that says only turn the yaw whereas when I’m flying it does roll.

Anyways I was wondering if there’s anyway to switch between the two logics, something like hooking up the flying to a custom movement mode (or just making it the properties of the regular flying mode) I can activate and deactivate. I tried this but my speed bump was I wasn’t sure how to stuff a ton of logic into one execution of movement mode change. I also thought maybe it could activate like a vehicle?

Thanks in advance for the help! (:

Edit: I’m adding this to my main post because I figure it’s good information for anyone else willing to help!

So I have done my own pure blueprint movement logic, using this tutorial:

This is my movement logic. On the top, it has the left trigger propelling the character forward in air. Next is the yaw with the left analog stick. lastly is my logic for using the bottom face button to move up in air:

Here’s turning pitch and roll with the right analog stick:

Lastly here’s my current system for switching between walking and flying. It’s just enabling physics simulation so that you can fly in the air, and disabling so that you are affected by gravity and you land. (if anyone could teach me how to make it so it toggles with one button that would be great!)

The conflict arises mostly between these two things:
This, which is the standard 3rd person blueprint template movement controls:

And this, which is my “override”, changing the analogs to do pitch, yaw and roll, whereas the normal as seen in the previous picture is to only control yaw since you are on the ground, and the right analog is only for looking and turning yaw:

also btw - there is other logic I’m not showing, but it’s only for keyboard controls. My game will support both gamepad and keyboard but I’m testing mostly with gamepad, and once the logic is down it’ll be easy making it keyboard functional as well.

Basically what I need to do is be able to switch between that 3rd person planar movement logic and my own flying logic when I turn on and off physics simulation. My problem is that I’m not sure how I could set this up. I’m pretty sure that if I put a branch and bool between them, and hook it all up it will just activate whichever node the branch is connected to rather than change the functionality of each controller input, i.e. switch the right analog stick from controlling only yaw to controlling yaw/pitch/roll AFTER physics simulation is enabled (whereas this method I think would just make me turn the yaw if the branch was hooked up to the add actor rotation node)

I also asked reddit and someone suggested I have two player controllers on the same character and just possess the other one whenever I want to switch the movement mode… any idea how this is done if not sure of a better solution?

shameful self bump because I really need help! haha (assuming there’s a bump system on these forums).

Hi JakeD,

Please do not bump threads that have not gone unanswered for 4 or more days. This clutters the forums and makes it very difficult to parse through and help anyone. Thank you.

Character movement does have a flying mode you could probably use, but you also could be limited to some of the default behavior(like can’t turn upside down).
There might be a way to do it with pure blueprint, but I guess that’s pretty much a open question as I have yet to see people doing it.
Like you said disable the movement component and then enable physics on root component might be a way to do it.
Try experiment more and share your results.

[= ;156291]
Hi JakeD,

Please do not bump threads that have not gone unanswered for 4 or more days. This clutters the forums and makes it very difficult to parse through and help anyone. Thank you.
[/]

Sorry about that! Won’t happen again.

[=PenguinTD;156451]
Character movement does have a flying mode you could probably use, but you also could be limited to some of the default behavior(like can’t turn upside down).
There might be a way to do it with pure blueprint, but I guess that’s pretty much a open question as I have yet to see people doing it.
Like you said disable the movement component and then enable physics on root component might be a way to do it.
Try experiment more and share your results.
[/]

Hey, thanks for responding. So I have done my own pure blueprint movement logic, using this tutorial:

This is my movement logic. On the top, it has the left trigger propelling the character forward in air. Next is the yaw with the left analog stick. lastly is my logic for using the bottom face button to move up in air:

Here’s turning pitch and roll with the right analog stick:

Lastly here’s my current system for switching between walking and flying. It’s just enabling physics simulation so that you can fly in the air, and disabling so that you are affected by gravity and you land (if anyone could teach me how to make it so it toggles with one button that would be great!):

The conflict arises mostly between these two things:
This, which is the standard 3rd person blueprint template movement controls:

And this, which is my “override”, changing the analogs to do pitch, yaw and roll, whereas the normal as seen in the previous picture is to only control yaw since you are on the ground, and the right analog is only for looking and turning yaw:

also btw - there is other logic I’m not showing, but it’s only for keyboard controls. My game will support both gamepad and keyboard but I’m testing mostly with gamepad, and once the logic is down it’ll be easy making it keyboard functional as well.

Basically what I need to do is be able to switch between that 3rd person planar movement logic and my own flying logic when I turn on and off physics simulation. My problem is that I’m not sure how I could set this up. I’m pretty sure that if I put a branch and bool between them, and hook it all up it will just activate whichever node the branch is connected to rather than change the functionality of each controller input, i.e. switch the right analog stick from controlling only yaw to controlling yaw/pitch/roll AFTER physics simulation is enabled (whereas this method I think would just make me turn the yaw if the branch was hooked up to the add actor rotation node).

I also asked reddit and someone suggested I have two player controllers on the same character and just possess the other one whenever I want to switch the movement mode… any idea how this is done if you’re not sure of a better solution?

have two controller is not a good solution if you ever want to go multiplayer.
the rest is up to you, decide what logic to apply is the main thing you’d need to figure out.

[=PenguinTD;156523]
have two controller is not a good solution if you ever want to go multiplayer.
the rest is up to you, decide what logic to apply is the main thing you’d need to figure out.
[/]

There won’t be any multiplayer. But if that will work, great! any idea how to set this up and switch between the two?

search for the proxy controller in answer hub, I think they do it through AIController instead of PlayerController.
Just remember controller offers inputs to your pawn, it’s your pawn that decides how to move.

[=PenguinTD;156630]
search for the proxy controller in answer hub, I think they do it through AIController instead of PlayerController.
Just remember controller offers inputs to your pawn, it’s your pawn that decides how to move.
[/]

huh, if changing the playercontroller to something else, will it not be able to change to different logic? Will it try to use the same MyCharacter blueprint?

also, would switching to a different player controller be seamless? Like right in the same spot without it being noticable?

should be, since your camera shouldn’t change, so visually you shouldn’t really see a difference.
Check my Resident Evil Classic camera link, the change of camera pawn I possessed is instant.

[=PenguinTD;156721]
should be, since your camera shouldn’t change, so visually you shouldn’t really see a difference.
Check my Resident Evil Classic camera link, the change of camera pawn I possessed is instant.
[/]

Hey man, thanks for being so helpful.

So I sort of went my own route with this and figured a way I could try to solve it. It’s solved 1 problem out of a few I was having and sort of helps me out later on, so that’s good.
Basically what I did is make all of the movement logic check for movement mode in a branch with isflying as the condition. For the flying logic, it checks that isflying is true, and the WASD 3rd person template logic it checks that it is false. When I enable physics simulation to fly, it now also changes the movement mode to flying, and when I turn off physics simulation to walk, it now also changes the movement mode to walking.

It looks like this for flying:

And this for walking:

And here is the switching movement logic:

basically my current problems are that 1. I can’t turn the pitch on the ground. 2. I can’t turn the yaw on the ground unless I’m moving. 3. when I run, it still turns the character and camera in the direction of the left analog stick unless I hold it in that direction, and the forward vector is still locked to the north direction only.

basically you are wasting the branch’s another output, where you can use those to do the thing you want in another mode.(since you can only have one input event each in a blueprint)
And you can use flipflop to use just one trigger or button to toggle your movement mode.
Then there is the use controller yaw/pitch check box for movement component, you might want to consider that as well.

[=PenguinTD;157566]
basically you are wasting the branch’s another output, where you can use those to do the thing you want in another mode.(since you can only have one input event each in a blueprint)
And you can use flipflop to use just one trigger or button to toggle your movement mode.
Then there is the use controller yaw/pitch check box for movement component, you might want to consider that as well.
[/]

Thank you! This a long with tweaking some camera settings solved my issues. Thanks again so much for all your help! (:

JakeD, I’m trying to do something similar. I was wondering if you could post your final solution. It would help me a lot.