Setup a vehicle in under 20 minutes in UE5! easiest way to setup a vehicle!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello guys uh welcome to a new video this one is a request on how to make vehicles in Unreal Engine 5 um yeah we're going to use the plug on Military pack for this but you can use whatever car you want and uh yeah we're going to get started by making a new vehicle project uh just select where you want to put it and then I'm just going to name it um V call template project and then just create it and I'll be back once the project is created all right guys once the vehicle project is up and running as you can see if we press play we have the default ue5 vehicle project and and yeah let's get started so the first thing we want to do is import the assets that we're going to use like I said I'm going to use the military pack for this the polygon military pack but you can use whatever you want just find your project and add to it like so now just wait until it's here in the meantime what we're going to do is we are actually going to set up some um some actas that we're going to use so make a new folder call it core and inside here what we want to do is actually go into the vehicle template take this vehicle at at the pawn class and duplicate it and we're going to call it BP vehicle Master press save then we're going to drag that into the core folder which disappeared so I'm just going to make make it again so core then go back and drag it into the core folder like so next thing we're going to need is if you go to blueprint class and then you select the wheel it will have the chaos chaos vehicle wheel select that one and we're going to call it BP V call Wheel front and then we're going to duplicate it and we're going to call it back so you have the front wheel and the back wheel Now open up the front wheel for a second on the right you see the different um things we can modify and what we're going to do is just say this is the front wheel wheel radius and width will adjusted based on the wheels itself we'll check that out in a second then you can just play around with these values I'm not going to go too in depth about it I'm just going to show you how to um make the vehicles itself and then you can play around with the values um as much as you want um after that we want to say that the front wheel is affected by steering um you can say affected by engine if you want to have a 4x4 but we're not going to do that we're just going to have a normal one um affected by handbreak no affected by brake no if you have a re rear wheel drive you won't have that but we'll just put it for more like an arcadic arcade five after that you can close this one down and the back wheel you want to say it's the rear wheel uh um affected by handbrake yes affected by engine yes traction control I'm going to enable that and then affected by steering is no everything else you can play around with it but uh we're going to keep it like this okay so next thing we're going to do is actually open up the vehicle Pawn class and in the mesh we're actually going to grab the vehicle that we want so now that the military pack is in here we're going to go into um the vehicles and we are going to be using the uh let's take the SUV why not so we're going to add this here and of course you might need to adjust the camera a little bit you know but that's not a big issue now to set it up so we can actually drive this we're going to go into the vehicle movement component and we are going to go into to the wheel setup it already has four wheel setup but we need to uh put in the sockets that we're using so double click on the mesh to open it up and as you can see right here it has the front left front right rear left and rear right we're just going to be copying this bone name go in here and so for the first one it's front left then it is front right then it is rear left and rear right okay and now as you can see it says pocal wheel front we just want to switch that to the ones that we just created which is the vehicle wheel front and the vehicle wheel back like so and now to see how big the tires are the diameter of it what you can do is go into the SUV go into the right of it oh actually no that's that's not true um what you can do is just uh drag in the SUV into the world for a minute like so just going to turn around like so and now if you go into one of the side views I think it's side view I'm not too sure we'll have to check that out no it's actually the front view there you go and now you can actually see the vehicle and what you can do is if you press the middle Mouse button you will actually um measure how big the wheel is so it is 90 the diameter is 90 so what you can do is go back into the vehicle wheel front and the radius just set that to 90 and for the width we can go into the right VI and now the width of the tire is say 35ish there you go now we just need to make sure that the back wheels also have the same thing so 90 and 35 now that that is set up we can actually just it should work let's see engine setup it is all set up um it should work so if we just go into the perspective now and we go in in the bottom right here we go to World game mode and we set this to be the actually let's call this let's call this BP vehicle master and then if we search for master we can actually get the I think I accidentally had the wrong one yeah vehicle Master let's call that that again um and if we type in master like so and we play as you can see the camera is off but if we drive all right yes as you can see it does work um we are driving the car the the main issue is first of all the center of mass is completely wrong um second of all the wheels aren't animating in order to fix the wheels not animating what we're going to do is actually go back into our core we're going to create a animation blueprint if you go to the parent class at the bottom we can say vehicle animation instance for the SUV we're going to call this animation blueprint SUV 01 okay open this all you want to do in here is get a mesh space ref pose into a wheel controller and that goes in there with a component to local and that is it go back into the vehicle Master as assign the animation blueprint to it which is right here now if we go into the game as you can see now the wheels are animating and everything is working fine the one issue that you're going to notice now is that the center of mass is off the car flips really easily a way that I found to fix this is to go to the mesh add a scene component and we're going to call this center of gravity and all you're going to do here is place this center of gravity where the bottom of the car is roughly so we'll say something like that and then we're just going to copy the location go into the vehicle component and if you scroll to the bottom it says enable Center of mass override and you're just going to paste the location there which is 50 now if you go into the game and you go as you can see the car doesn't flip that easily anymore because the center of gravity is way lower so that is already fixed like so and if you press the space bar the handbrake will come on um if you press s he will into reverse and yeah that's basically a really simple tutorial on how to set up vehicles um if you have vehicles with multiple Wheels um that's also possible to do like for example if I go to the um let's take one that doesn't have the tracks um let's say the APC let's say the APC right you can do it as well the only thing you have to do is make sure that all the wheels are in the animation uh in the blueprint so we'll just do it quickly right we we have time left so all I'm going to do is I'm going to create a child call it BP APC 01 we're also going to to create a animation blueprint once again for the vehicle animation instance going to call APC and we're going to see which one this is um which I think it's apc1 we're going to call it AP APC 01 now if I oh it's not the correct one hold on um this is actually APC heavy 01 okay so delete this go back anation blueprint call the um ABC heavy there it is call it ABP ABC heavy 01 or just call it whatever you want I'm just keeping the name the same because it's easier uh once again a mesh space into a wheel controller that goes in there like so open up the APC blueprint change this to the APC heavy give it the animation blueprint like so of course you need to adjust the camera a little bit but you can do that you know I'm not going to worry too much about it now just going to set it back a little bit like so and now in the vehicle movement component where you have the wheel set up right here what we want to do is we want to have all the wheels in here so this one has eight which the first four are turning the other four are not so what we're going to do is say one is a front wheel two is a front wheel those are front wheels and those are back wheels so what we're going to say is copy this go to the vehicle Master into the APC sorry and then we're going to have front wheel 01 front wheel 02 then we actually want to have two more for the front this is the front wheel right 01 and the front right 02 and then we want to have four more open those up these are the back wheels like so go into here and we say rear left 01 02 and then the right wheel 01 and 02 like so compile and save and that should be all we have to do so if we go in here and we see say APC master or APC it is yes delete this guy and now if you play press play as you can see the wheels are animating simulation is working fine center of gravity might need to be adjusted a little bit more it really depends on what you want and as you can see it is working perfectly um the turret is moving um because it's being simulated if you want to disable that what you can do is actually go into the mesh then go into the animation uh the physics asset of this mesh you can go into the turret turret and the turret gun and what you can say in the physics type you can say kinematic by doing that it will not simulate the physics but yeah as you can see it's does kind of break the um simulation of the rest you can also say simulate it it's been a while since I've done this but um no that does not seem to work either all right guys um I am back um I found an easier way to do it instead of calculating this so if we just delete this I'm sorry but if we just quickly delete this and also the transform bone and we go back into the physics asset and we actually click on the constraints which if you open this drop down and say show constraints you select the heavy turret and the heavy gun and then in the still simulating okay and then in the right side if you scroll down to angular limits this one will be um this one will be open by default you just want to set this to locked which that will mean that this turret will not move um when using simulation so if I now go into the game and I drive and I turn around as you can see the turret will not move around you can still modify it by getting the control rotation of the mouse and then adjusting the turret to that if you guys want to see a tutorial on how to do that like how to set up tanks and um tanks and apcs like this with turrets let me know and I'll make a followup tutorial for that but uh yeah that's how you set up vehicles um this does not include tanks with tracks that's a whole other thing that will require another video but uh yeah every every vehicle that has wheels on the floor will be able to use use this so uh yeah I hope you guys enjoyed it if you did please leave a like uh comment what you want to see next and uh subscribe to the channel if you can I would appreciate that and uh yeah I'll uh talk to you guys in another video see you
Info
Channel: Rebake Studio
Views: 926
Rating: undefined out of 5
Keywords: UE5, How To, Driveable Vehicles, APC, SUV, how to create driveable vehicles, ue5 vehicles
Id: iva5gTy5DnE
Channel Id: undefined
Length: 18min 15sec (1095 seconds)
Published: Sun Mar 17 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.