Hello, I’m new to unreal engine 5 and coding in general and I’ve been fallowing this tutorial: UE4 Flying Jet Movement 4.25 - YouTube I’m stuck at 12:05 where he says we should be able to see the flying pawn moving.
I don’t know which one I should be picking from the drop down menu, but when I tried first my camera was behind my character just not moving at all then I set a couple of those collisions and my camera wasn’t behind the character anymore.
Hey there @Hakushi! Generally I avoid using physics for systems where you’re going to want full control ie starfox style movement. That said I’m here to help, not force you to refactor everything you’ve done! To keep with your tutorial, you’re going to want to set it to Custom and go down the list of what should and shouldn’t collide with it. Set the camera collision in that to ignore, and the object type to pawn, and you shouldn’t have any issues out of the box and can continue your tutorial. Let me know if this helped or if you have any questions!
Bonus tip: In your hierarchy, if you have an object set to simulate physics, it’s usually best to make it your root (by dragging it above the root object) as when it starts simulating physics it will in fact separate from the root anyway. (unless it is the root that is).
Hello, thank you for answering, do you have a tutorial I could fallow that does it the way you would? That said I’ll try your solution and let you know how it went.
Another question, when you talk about the hierarchy you are talking about this right?
So I should move the coreling above all?
Ok so I think I tried your solution but it didn’t work, I’m not sure if I did something wrong:
I took a look around and was unable to find a direct tutorial on specifically star fox style movement in the way I’d do it.
It’s generally doing the exact same thing as you are now, but with the floating movement component and utilizing some of it’s natural features. It lacks (faked) gravity on it’s own though so if you wanted that then it’s either physics sim or another type of movement component.
Another method is using a spline (as most of the starfox titles are on rails), and only adjusting the local location of the ship on said spline. If you were looking to do spline based movement I have a tutorial that shows you how to get the spline movement rolling if you wanted to try that out in the future.
Disclaimer: One or more of these links are unaffiliated with Epic Games. Epic Games is not liable for anything that may occur outside of this Unreal Engine domain. Please exercise your best judgment when following links outside of the forums.
But what did I do wrong then? Why isn’t the tutorial I am fallowing working? Did I set the collisions wrong?
Also I took a look at this spline tutorial It doesn’t seem like you have full control of the character using this, I want movements like… Maybe f zero X but in the air if that makes sense?
It might be related to the mesh itself needing to be the root, he glazed over it in the beginning of the tutorial but it is immensely imperative. You had it right, just dragging it over the root and dropping it.
Now we can get into some debugging! So first things first, is the pawn set to auto possess when you start the game or do you have it set as your default pawn in your gamemode so you automatically spawn as it? Otherwise you spawn as a totally different placeholder pawn.
If you put some prints on your character’s inputs just to verify it’s receiving them, it might clarify some of the issues!
Also, for the spline bit, it’s more relevant if you were doing older starfox titles where you were on rails and only moved around in the screen space. That tutorial just gets you the spline movement, after that you’d still have to add local offsets to the ship to move around the screen, and even more work to aim things etc. It’s just the first piece to that puzzle. F Zero X was kind of the same way. Constrained to the track without full 3D control. Many things we do tend to start as one thing and add different bits of knowledge (and usually kitbashing tutorials together in the early days) to get a different outcome.
I didn’t know those games were made using rails! I always thought it was free movement since you can get out of the road in F zero X! The more you know
I think it’s set to the one I’m making? Not sure if this is the correct option.
The racing games not quite as much. It’s more of defined track system where they were pushing the limits of early 3D but it’s decently constrained. I was remembering one of the early F zero games where it was solid track.
Alright so your default pawn is called flying movement so that’s good. So when you start your game you should spawn at a playerstart as that pawn and possess it, so the camera is attached and you should be routed to the correct one.
Now, in your blueprint, right after your input fires, add a print string for one of them just saying the value of that axis. This will let us know if your pawn is receiving the inputs. Afterwards we’ll know if you’re just having a camera issue, a logic issue, or a map issue (or combination).
Alright, so it seems your inputs aren’t making it into your pawn even if the pawn is being spawned. So we’re gonna do a quick checklist to verify. When you play your scene, hit Shift + F1 to release your mouse from mouse lock, then click the pause icon, then the Eject icon. This will let you see the scene that’s currently playing from the editor directly. You can then see if your pawn is the one you’re attached to.
You should see your pawn, and can move the camera around now. Just pull back and take a look at your pawn, make sure there’s only one, verify that it’s there in the outliner. It’s reference in the outliner will be yellow. If you click your ship it will also highlight itself in the outliner as well.
Since your print didn’t work at all, your inputs aren’t being received. In your player start actor in your scene, make sure it is set to always try to spawn.
No worries! I was off work since yesterday, so apologies on the late response! So when you have a physically simulated SKM, it basically ragdolls initially. Physically simulating an SKM intentionally makes it a ragdoll, so it’s very easy to make ragdoll physics off the bat. In your case it’s not what you want. I believe you can change the physical asset itself and make it rigid, but the downside here is that because your flying system is physical, your animations would prefer to be as well. Not too bad for an experience dev, but you may face a bit of a challenge there.
So there’s a ton going on in this image, so I’ll explain where I’m at. I’m in the Physical Asset of the Skeletal Mesh. You may or may not have one already for your mesh. I’ll include a tutorial for making one at the bottom of this if you haven’t. This takes over when you simulate physics on an SKM. This way you can control how the limbs bend and move. This helps not get super whacky distorted ragdolls. However in your case you’re going to go in and select the limbs, then their constraint (in the left) and set the constraint to either limited or locked. This will allow you to have those bones completely rigid by setting those values to 0, or locked.
Disclaimer: One or more of these links are unaffiliated with Epic Games. Epic Games is not liable for anything that may occur outside of this Unreal Engine domain. Please exercise your best judgment when following links outside of the forums.
I think the first thing to do would be to verify if it’s physics being weird or if it’s a logic issue. SKMs can have odd effects when simulated, if you’ve ever seen a ragdoll in a game get it’s arm stuck in it’s hips, it starts doing somersaults infinitely because there’s no reduction in the force that’s pushing it. Your SKM’s arms might be causing this. Strapping this code onto a static mesh it should run fine. Only forward with what you have right now (unless the UpVel is already declared).
Are you generating your Up Velocity variable anywhere or any torque?
And also, If I use a static mesh instead of the skeletal mesh can I use my animations still?
And it seems that the thrust value in the video was too high for my drone for some reason I lowered it and it worked better, It still behaves a bit unstable though.
Also for some reason there is a copy of my actor that falls off. Anyway, you have helped me alot! thank you very much.
The static mesh test was to verify if your SKMs “arms” there were contributing to the physics flipping out even though you locked them, not as a solution. I doubt they are contributing. The camera having some lag behind the movement is pretty disorienting. Are the movements just incredibly exaggerated? Your rotations, while decently high values, should be fine. Can the ship just go forward, or does it start shifting immediately?
No the camera lag is not intended either. I’ll show you the settings here.
and the ship goes forward without input for somereason although I think the person who created the tutorial made it that way (I don’t want it that way) and the ship starts spinning uncontrollably and is hard to maneuver (turn and roll inputs are working) and the reason I set the rotations that high is because of this because it helped me control it a bit better.
So first thing you can disable the camera lag by unchecking these two on your spring arm
You can enable them again later should you want to once we get a good idea of why your movement is spinning out. This is part of the “fun” with physics based movement. It looks like you locked the arms themselves fine.
Yes the tutorial is made so you go forward unaffected by gravity unless you go too slowly.
If you’d prefer I could show you a better way to do this without physics. Are you trying for like plane never stop moving movement or like floating drone full control?
They seem to have full control over their movement (except for when they stop going forward they don’t fall and i’d like them to fall if you are not trying to move forward or maybe a way to make them fall).
Also yes, for your I’d like a way without physics. But I still wonder why physics based movement isn’t good for skeletal meshes.