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?