THIS WORKS WITH BOATS! Hey! Just so you and anyone else who stumbles upon this comment. This actually works with getting boats to move too (Hence the CAPS because for some reason it's exceptionally difficult to find a decent boat tutorial)! Thank you so much, you have no idea how much headache it has given me trying to get a simple boat to work haha! I started unreal like a week ago and this was almost my 13th reason haha!
@@marcoghislanzoni unless people have the same idea I did to use a car blueprint for a boat, then it's quite difficult to actually find a decent tutorial So I'd say go for it! make a boat tutorial!
Is that working without any modifications? I need to get this working with a boat as well but I started unreal less than a week ago and I don't wanna mess things up too much.
Thanks so much for this. Decided to do this in C++ and almost done now. Looking forward to more videos like this (would love to see you make a physics based car as well like this one) 👍👍
Wow dude. I honestly wasn't expecting another video from you (I guess you're pretty busy!) but this is an incredible and complete tutorial. If you had a tip jar or something I'd tip you for this. Thank you.
Gravity is not too difficult to add, bouncing against obstacles definitely more convoluted as we are no using the collision resolution from the physics engine, hence we would need to implement our own.
Got a question: When I select "Show all bones" at 6:45, the car I've imported doesn't have Wheel bones for some reason. It has a bunch of other bones (steering wheel, mirrors, doors, etc.) but not wheels. Is there a way to create a new bone from scratch and just position it where the wheels are on the car? Or do bones HAVE to be pre-existing in order to attach a shape? Alternately, I have a separate car model I've imported that I can use instead, but this one has all of its Physics Assets attached in separate files in the Content Browser. Meaning, this one DOES have wheel bones, but in a separate Physics Asset than the body bones. So it feels like there should be a way to merge two Physics Assets from the Content Browser, but I can't seem find a way... (Sorry, I'm very new to UE5 and game engines in general)
If you have the various parts of your car (like the wheels) parented to the body and you import the FBX asset to Unreal forcing it to be a skeletal mesh, Unreal will automatically create the corresponding bones for you. The parts have to have their own pivot point, that's where the bone will be created. I have another tut on this channel showing how to do it for vehicles in Blender.
this is awesome, but i was wondering how you would do drifting/power sliding with this setup. since it's not physics-based, how would you get that consistent turning while being able to adjust it until the "drift" button was released?
You will need to implement your drifting/power sliding into the car's rotation. Say that you have a drifting/power sliding button, as long as you press it, you look at the steering angle and use that information to apply some extra rotation to the car (either in the same direction or in the opposite direction respect to the steering). I always wanted to do an add on tutorial covering drifting, maybe it is time for it.
How would you implement Gravity for this? IT Always tells me im attempting to move fully simulated Skeletal Mesh, try to use Teleport Flag, which i sind nur the Error still occours
Hi love this tutiorial I mage a tractor and a combine harvester and they came out sou good. there is just one problem, the collision. you see you used the skelatel mesh wheras i used a static mesh. I keep trying everything to turn on collision. Is there any way to fix this. PLEASE🙏🙏🙏🙏🙏🙏
Hi Nathan, glad this tutorial has been useful to you. Skeletal mesh or static mesh doesn't make any difference, but you have to check that whatever you want to collide with is blocking your pawn and the pawn is blocking them. In other words, both the pawn and the world prop have to block each other for the collisions to work properly.
Hi, thanks for amazing tutorial! I have problem at 41:50 in the tutorial, when I change the speed in the Event graph, the connect car- body also turns in Y-axis.. I want onlz the wheels turn in Y-Axis, coudl you help about it?
Hey I loved the video thanks so much. I have a couple follow up questions but i'll be sure to check out your other videos to see if you covered them. 1. What if I wanted mouse control with the InCar cam, i tried to apply the same method that was used with the chase cam but I don't think it was possible with both cameras with this method 2. Is there a way to add a skeletoned rig to the car, for instance if I wanted to add the player in the cockpit 3. If so is there a way to constrain his hand position with the wheels turning?
@@deathswirl 1. You can use the same technique on both cameras. 2. You can parent a skeletal mesh to the car mesh and have it sit in the car. 3. To have the hands follow the steering wheel you need to use inverse kinematic on the driver skeletal mesh. You can use control rig or the FABRIK animation node.
Car is missing materials/textures. When I create a new game project in UE5 that was released a few days ago, I get landscape instead of default ground/floor.
UE5 comes by default with a terrain level. You can always add a new level with the usual empty floor and delete (not save) the default one. Don’t know why the car comes with no textures, it should work.
Hi Marco, after looking at some of your tutorials and reading some of the comments and your replies you appear to be quite knowledgeable, willing to experiment, and courteous, a great combination. I was wondering if their is a private way of contacting you, since I have a small project you may be able to help me with.
Hi again Marco!! Since u r one of the few people who actually respond (much appreciate it) I will ask another question: Does ur tut only apply to Skeletal Meshes or can it work with Static Meshes too? What is the reason for using one over the other and how does a person decide which to use? Thanks!!
Skeletal Meshes are handy if you need to animate them, plus with the Control Rig you can do some fancy stuff. See for example the off-road vehicle in the vehicle template and how its suspensions were animated with the Control Rig. With static meshes you are on your own to move/animate each one independently.
Hey there! For some reason my car is not able to steer, and can only go forward and back, I checked multiple times and I think I followed exactly what you did. I am also using my own skeletal mesh though, so Idk.
Do you know of a way to drive up hill and down hill? I've tried myself by using a linetrace that shoots down from the vehicle to set the slope angle degrees on the Y rotation and set the relative rotation of the vehicle, but it's not perfect. driving up hill is very very slow compared to driving on a flat surface and down hill. Edit: I did also transfer all the code to a character BP because when I got to the end of the video my vehicle wouldn't move. After creating the character BP, It works animation are playing and the car moves as expected. The only thing that's hindering me is the driving up and down slopes. Edit: I'm watching your Kinematic Tank with Ground Sensing from Scratch (Part 1) Now. Sorry I jump the gun a lot
I don't do a lot of development for Android mobiles (expect Android VR) so not 100% sure. In principle you can use the touch inputs to rotate the spring arm, which will result in the rotation of the camera.
Hi Marco, Thanks for the great tutorial. Just wondering how you would work a boat running aground or scraping over shallows? Or say if the car drove over mud. I see in the comments you are thinking of doing a boat tute as well. The above and bouyancy / rocking with the waves would be awesome. Thanks again. Liked and subbed.
With a kinematic approach you have full control on how the vehicle behaves independently from the physics engine. For example, you could easily add some drifting capabilities which with physics are extremely tricky to reproduce. On the other hand, when going the kinematic way you don't have full support for collisions or other interactions with physics simulating actors. Which one to choose (kinematic vs. physics, including Chaos Vehicles) depends on your application.
Loved the video :) but am having big troubles with getting the animation to work. I followed the video to a T but am getting an "Attempted to assign to None" error when it comes to introducing the animInstance to the BP_KinematicCar eventgraph. Some input would be massive! thankyou
Thanks, glad you enjoyed it. Double check that you are casting to the right AnimBP. Add a Print String after the cast to make sure it is working and not failing. Also double check that you actually assigned the AnimBP to the Skeletal Mesh in the vehicle BP.
Hey man, im getting everything to work except the steering wheel. I set everything up as in the video, but my steering wheel bone is face towards the front right tire (i dont know if thats important to know). I also put the model in blender and selected the wheel and pressed local, but none of the axis are changing (not like yours did that faced downwards more). However, even with that not working my wheel isnt making any movements at all. I set the bone in the eventgraph and followed everything 1:1. You have any idea what to do?
I would like to see a continuation of this concept, I liked the video with the motorcycle, the implementation of engine sounds, what about the RPM, gearbox and the rest of this car?
The point of working with a kinematic vehicle is to have something easy to implement and control. By adding an engine simulation, a gearbox etc. things will get more complicated and it will become gradually difficult to link those properties (e.g. engine inertia, RPM, gear ratio, etc.) to the handling of the vehicle. I think you are hinting more to a physics simulating vehicle where each part interacts with the other ones and the results are more realistic than arcady. Eventually I will find an easy way to implement also such a vehicle and to make tutorials about it.
@marco Hi Marco nice tut, everything does work as laid out in your video but i think there's a problem... Whenever i try to add a landscape, with a slight hill... or even add a few ramps... the vehicle stops dead... i think it has something to do with collisions, but why wouldn't the vehicle simply go up the ramp or slight raised bumps? FYI... i used a buggy vehicle so it has the lift to be able to climb/go over. Thanks much for any insight/help. Keep up the great work!
Yes, that happens because of collisions. In the current code there is no detection of the ground the car is running onto, so it cannot sense if there is a slope or ramp, adjusting the rotation to stay parallel to it. I plan to cover this in a future tutorial, but it is a matter of doing few line traces toward the ground and setting pitch and roll according to the returned hit normal.
@@marcoghislanzoni Thanks much Marco! Appreciate it! Really looking forward to your tut that covers that. I have searched for a month now.. and it seems arcade driving mechanics are not possible with the Chaos system in UE5... that or i am too new to understand the possibilities in UE5!
@@zalansari6454 It's definitely possible but while you have physics vehicles out of the box you don't get kinematic/arcadish one directly, you have to build them from scratch. This is the gap I am addressing with this series of tuts.
@@marcoghislanzoni Agreed Marco... though i will also state that as a very HUGE Noob... i have come across very many issues that put me in a very difficult situation while trying to learn UE... For example in UE5, the buoyancy functionality in LakeBody does not work... UE4 Physix's based tuts and steps are not easily replicable in UE5, especially if there's C++ involved. And tons of other things in UE5. As a beginner, majority of the UE5 tuts are not detailed or cover the same topics as majority of the UE4 ones. I cant follow or make something, from UE4, in UE5 because, at some point, all of that UE4 will need to be migrated into UE5. Either you cant migrate it fully because of issues, broken code, functionality, and the longer you wait, the more issues you will run into for the migration.... Very frustrating and i feel lost.
@@zalansari6454 don't feel bad about it. UE5 is a massive game engine with tons of features and you cannot master them all in a short time frame, it's literally impossible. Plus UE5 is, respect to UE4, very new and it doesn't have yet the amount of tutorials/projects/documentation the previous version had. The best thing you can do is to keep working with it, ask questions on the forums/Discord, try, fail, try, fail, try, succeed! Good luck.
Hi @marcoghislanzoni could you please do a tutorial on 1. How to setup controls using the new Enhanced input system for cars and also one on setting up the finer details for the handling of the car. I've been trying to make an F1 car but it doesn't accelerate as fast as it should and the handling went from bad to worse 😅
Check out the standard Chaos Vehicles templates that ships with UE5. It has the code for the brake lights ready-made. You can port it over to this project.
@@polygrind Your lights have to either be a separate mesh attached to the car or masked on the car's material. Check how they did it in the vehicle template.
@@marcoghislanzoni now that I think of it, the light mesh is separate, basically a puck inside the glass. What I don't get is how does the sports car blueprint selects that specific mesh. Another issue is that, once I use the breaks and a random part of my car model changes material, it stays stuck that way until I restart the play sim.
Hey, I have one Question, I don´t get where the Steering Angle float (steeringwheel) gets is data from. Did I miss something? Where do I "connect" it to the actuall input axis?
Hello Marco, when I try to record in Sequencer the car movement I'm no being able to see the wheels rotating or steering from the anim blueprint, any idea of why this is happening?
If you record the skeletal mesh whatever animation the bones get should be recorded as well. When you play it back you need to make sure the recorded animation is assigned to the skeletal mesh.
@@noaguy5116 that’s fine, it should record it anyway. Maybe there is something not set up correctly on your side, but it is difficult to tell without seeing it.
Hi, I wanted to ask how to make enhanced input work with this tutorial. I'm not exactly sure what to do since I am a beginner in unreal engine. I made the input actions and the mapping context but I don't know what to do next. Any help would be appreciated!
That's not easy to describe in full here. If you open the standard vehicle template which ships with Unreal Engine 5 you can see how it is done there for a car pawn. You can copy the same input system/events into this one and it should work. Also look at my Tank tutorial, that one shows how to use the new Enhanced Inputs.
Hey there, great walkthrough, how would I import a car that has no wheels? I would like to keep the wheels separate so I can swap different wheels meshes but I just don't see a way to create wheel collisions without actual geo, must be missing something. Thanks!
When using the Enhanced Input system with the throttle and steering events, the speed and rotation never decelerate to 0, as the respective input events are completed before it has time to do so. Do you have an idea/solution to possibly solve this?
You have to set the target velocity to 0 on the Completed pin of the Input Action. Have a look at my recent tutorial on the Kinematic Tank, I am showing it there.
Hey there, loved this tutorial! It really helped me out with my project. But I'm a little stuck with a weird problem. You see, every time I turn to the right for example, my front wheels turn to the left in the opposite way which is strange cause I tried this once before on another car and I didn't had this problem. I followed this video step by step, detail to detail, but I couldn't solve it. Any idea how I can fix this? Thnxx
Hard to say, it may be that your wheel bones are reversed or the car is not aligned along the positive X axis. You can multiply the steering angle by -1 before passing it onto the Animation BP. See if that fixes it.
@@marcoghislanzoni I fixed it! I didn't notice I aligned it along the negative X axis in Blender. Thnxx for the help! Is there any platform(s) I can find you to give you credits for this?
Hi Marco! Loved your tutorial, I added a few extra animations and cameras and everything is right. Do you have any source in which I can learn how to aply different heights to the terrain so it´s not flat? Thank u for this awesome videos
Cool! If you can share a video with your progresses, I would love to see how it looks like. Regarding terrain detection, this is something I plan to cover in a future tutorial. Thinking of a tank or off-road vehicle.
Please could you help me. I have been struggling with my vehicle for weeeeeks! I have an APC ported over from UE4 but no matter what I try, it won't work properly in UE5. The wheels bug out, and physics doesn't work, it either freezes in midair or slowly slips through the floor a bit. I don't know what to do anymore.
You may have scaling or rigging issues. Make sure the scale of your vehicle’s root bone is 1,1,1. If you see 100,100,100 that is your problem, then you need to fix it in an external program like Blender and reimport to Unreal.
@@djtc2093 You need to do it in an external program (like Blender/Maya/Max) and then reimport into Unreal. In Blender, set the scene scale to 0.01, then scale up your mesh by 100, Apply Scale, export as FBX with scale 1.0 and import to Unreal also with scale 1.0.
@@marcoghislanzoni Thanks I will give it a bash. One more question, how would I animate a tank/APC turret? I have a working APC, that's drive able etc but I can't get the turret to move, what blueprint would I add that is equivalent to a chaos wheel blueprint to get the wheels working? Any suggestions?
Hey Marco! Congratulations on your work! Do you believe this methodology would apply to high poly models as well? To record automotive scenes for tv advertisements, for example?
Visually yes (with some adjustments). Dynamically though there are a lot of nuances to making a realistic and believable vehicle simulation which would fit in a high quality advertisement. Drop me a line at my first name dot my last name at gmail dot com if you would like to chat about it more in details. Or contact me on Discord - Unreal Slackers as vr_marco#8894
Oh, thank you so much for your reply! Glad to know this is doable. Reading about the details of the tech demo "The Matrix Awakens", I saw that the developers said that most of the cinematic scenes were shot capturing the "runtime action". The designers drove the cars through the streets of the set and later a cinematographic production methodology was applied to this captured action. This sounded great to me and now I'm looking for knowledge to try to reproduce this workflow. If it's not a problem, I'll email you.
I have a problem that I should have asked a long time ago I have followed your tutorial and other TH-camrs videos about making a car from game and I always get the car to work (driving, steering and etc.) but whenever I drive the car itself is always shaking, jittering all over the place. I have checked the physics, the model, I followed the steps that I had to follow when it comes to exporting from blender and still have no idea what is the problem, I usually use the simple vehicle movement set up.
I can think of two potential problems. One is internal collisions, where one part of the car gets in contact with another one causing instability. The other could be performance, where you have a lot going into your level which slows down the physics also leading to instability. Hard to tell without seeing how it looks like.
@@marcoghislanzoni Thanks for your response ,I believe its the first one because my level is empty and it only has the car in it, sorry but I deleted everything out of anger. So how can I go about fixing it do you think its a issue from blender or something I can fix in Unreal
@@victoirelotika8687 when rigging in Blender and importing into Unreal make sure the root bone comes in with a scale of 1,1,1. If the scale is 100,100,100 you will get problems with the physics. Check out my easy vehicle rigging tutorial with Blender.
@@marcoghislanzoni I am able to get a video for you to see and this problem also happens even if I don't use bones in blender but let Unreal Auto generate bones for me. th-cam.com/video/urCFaHgzeZU/w-d-xo.html
well this only works for me if the player isn't attached to the vehicle otherwise it just spins to the right, no idea what to do, on to yet another tutorial we go
@@marcoghislanzoni actually no, It would be nice to have a complete animation blueprint that would include wheels and steering wheel, I've tried based on other tutorials and it doesn't seem to work. I'm testing the car for a small game. www.twitch.tv/videos/1801820084
@@marcoghislanzoni the collision isnt working for me either in 4.26 not sure why. the car goes through everything unless it collides with a physics actor which is the only time it acts with a collision. great tutorial though i didn't want to use the vehicle movement component and this definitely helped a ton but in my game i wanted to have inaccessible areas for the car with blocking volume but the car goes through it and now I'm stuck with this issue not knowing how to fix it :(
Thank you so much for this amazing tutorial, it helps me a lot! Do you have any suggestions on how to make more physical collisions? Because actually the kinematic car simply stops on the first static obstacle.
Collision related effects also need to be handled kinematically, for example by applying a backward movement for a certain time as soon as one is detected. This simulates an elastic collision taking place between the car and another actor.
This has been on my todo for a while, but drifting physics isn't the easiest since, to make it consistent, you need a proper tire friction model and few other nuances. If it becomes a tutorial it is going to be a lengthy and complicated one. If I manage to find an easier way to implement a reliable and controllable drifting be sure I will share it.
nobody should follow this tutorial, there is a lot of info left out here and this is the absolute worst way to do this. keep searching google for different vehicle tutorials
Can you be more specific about which "info have been left out" and which kind of tutorial you were expecting given the fact that this is explicitly about creating a *kinematic* vehicle? I suspect you were looking for a tutorial about creating a physics vehicle. You should check out my other tutorials about Chaos Vehicles.
THIS WORKS WITH BOATS!
Hey! Just so you and anyone else who stumbles upon this comment. This actually works with getting boats to move too (Hence the CAPS because for some reason it's exceptionally difficult to find a decent boat tutorial)!
Thank you so much, you have no idea how much headache it has given me trying to get a simple boat to work haha! I started unreal like a week ago and this was almost my 13th reason haha!
Indeed! I was planning a boat tutorial as well, but you were faster. ;-)
@@marcoghislanzoni unless people have the same idea I did to use a car blueprint for a boat, then it's quite difficult to actually find a decent tutorial
So I'd say go for it! make a boat tutorial!
Is that working without any modifications?
I need to get this working with a boat as well but I started unreal less than a week ago and I don't wanna mess things up too much.
Thanks so much for this. Decided to do this in C++ and almost done now. Looking forward to more videos like this (would love to see you make a physics based car as well like this one) 👍👍
Absolute Legend this guy Marco, took the time out of his day to sit and help me with various issues. He deserves more follows.
Wow dude. I honestly wasn't expecting another video from you (I guess you're pretty busy!) but this is an incredible and complete tutorial. If you had a tip jar or something I'd tip you for this. Thank you.
This is fantanstic! I would love an updated version that covers physics like gravity and bouncing when hitting obstacles etc.
Gravity is not too difficult to add, bouncing against obstacles definitely more convoluted as we are no using the collision resolution from the physics engine, hence we would need to implement our own.
We love you Marcoo
Got a question: When I select "Show all bones" at 6:45, the car I've imported doesn't have Wheel bones for some reason. It has a bunch of other bones (steering wheel, mirrors, doors, etc.) but not wheels. Is there a way to create a new bone from scratch and just position it where the wheels are on the car? Or do bones HAVE to be pre-existing in order to attach a shape?
Alternately, I have a separate car model I've imported that I can use instead, but this one has all of its Physics Assets attached in separate files in the Content Browser. Meaning, this one DOES have wheel bones, but in a separate Physics Asset than the body bones. So it feels like there should be a way to merge two Physics Assets from the Content Browser, but I can't seem find a way...
(Sorry, I'm very new to UE5 and game engines in general)
If you have the various parts of your car (like the wheels) parented to the body and you import the FBX asset to Unreal forcing it to be a skeletal mesh, Unreal will automatically create the corresponding bones for you. The parts have to have their own pivot point, that's where the bone will be created. I have another tut on this channel showing how to do it for vehicles in Blender.
Liked the video before watching it :)
this is awesome, but i was wondering how you would do drifting/power sliding with this setup. since it's not physics-based, how would you get that consistent turning while being able to adjust it until the "drift" button was released?
You will need to implement your drifting/power sliding into the car's rotation. Say that you have a drifting/power sliding button, as long as you press it, you look at the steering angle and use that information to apply some extra rotation to the car (either in the same direction or in the opposite direction respect to the steering). I always wanted to do an add on tutorial covering drifting, maybe it is time for it.
How would you implement Gravity for this? IT Always tells me im attempting to move fully simulated Skeletal Mesh, try to use Teleport Flag, which i sind nur the Error still occours
Yeah I want to know as well
Top! Epic tutorial!!!
You are incredible, thank you so much!
Hi love this tutiorial I mage a tractor and a combine harvester and they came out sou good. there is just one problem, the collision. you see you used the skelatel mesh wheras i used a static mesh. I keep trying everything to turn on collision. Is there any way to fix this. PLEASE🙏🙏🙏🙏🙏🙏
Hi Nathan, glad this tutorial has been useful to you. Skeletal mesh or static mesh doesn't make any difference, but you have to check that whatever you want to collide with is blocking your pawn and the pawn is blocking them. In other words, both the pawn and the world prop have to block each other for the collisions to work properly.
Hi, thanks for amazing tutorial! I have problem at 41:50 in the tutorial, when I change the speed in the Event graph, the connect car- body also turns in Y-axis.. I want onlz the wheels turn in Y-Axis, coudl you help about it?
Not sure I understand. Are you using the provided asset (car skeletal mesh) or an own one?
Hey I loved the video thanks so much. I have a couple follow up questions but i'll be sure to check out your other videos to see if you covered them.
1. What if I wanted mouse control with the InCar cam, i tried to apply the same method that was used with the chase cam but I don't think it was possible with both cameras with this method
2. Is there a way to add a skeletoned rig to the car, for instance if I wanted to add the player in the cockpit
3. If so is there a way to constrain his hand position with the wheels turning?
@@deathswirl 1. You can use the same technique on both cameras. 2. You can parent a skeletal mesh to the car mesh and have it sit in the car. 3. To have the hands follow the steering wheel you need to use inverse kinematic on the driver skeletal mesh. You can use control rig or the FABRIK animation node.
Car is missing materials/textures. When I create a new game project in UE5 that was released a few days ago, I get landscape instead of default ground/floor.
UE5 comes by default with a terrain level. You can always add a new level with the usual empty floor and delete (not save) the default one. Don’t know why the car comes with no textures, it should work.
@@marcoghislanzoni same problem importing into a new project in Unreal 5.2.1
Hi Marco, after looking at some of your tutorials and reading some of the comments and your replies you appear to be quite knowledgeable, willing to experiment, and courteous, a great combination. I was wondering if their is a private way of contacting you, since I have a small project you may be able to help me with.
Sorry seem to have missed your comment. You can find me on Discord as @vr_marco
Hi again Marco!! Since u r one of the few people who actually respond (much appreciate it) I will ask another question: Does ur tut only apply to Skeletal Meshes or can it work with Static Meshes too? What is the reason for using one over the other and how does a person decide which to use? Thanks!!
Skeletal Meshes are handy if you need to animate them, plus with the Control Rig you can do some fancy stuff. See for example the off-road vehicle in the vehicle template and how its suspensions were animated with the Control Rig. With static meshes you are on your own to move/animate each one independently.
@@marcoghislanzoni Thanks much Marco, appreciate the explanation!
Hey there! For some reason my car is not able to steer, and can only go forward and back, I checked multiple times and I think I followed exactly what you did. I am also using my own skeletal mesh though, so Idk.
This was solved by checking the code and recognizing there was a copy/paste typo. I understand it is working now.
Do you know of a way to drive up hill and down hill? I've tried myself by using a linetrace that shoots down from the vehicle to set the slope angle degrees on the Y rotation and set the relative rotation of the vehicle, but it's not perfect. driving up hill is very very slow compared to driving on a flat surface and down hill.
Edit: I did also transfer all the code to a character BP because when I got to the end of the video my vehicle wouldn't move. After creating the character BP, It works animation are playing and the car moves as expected. The only thing that's hindering me is the driving up and down slopes.
Edit: I'm watching your Kinematic Tank with Ground Sensing from Scratch (Part 1) Now. Sorry I jump the gun a lot
I was rotating the mesh and not the collision capsule, I am now rotating the collision capsule and I works much better.
How to make camera movement with touch for Android games. Please help me for my dream project .
I don't do a lot of development for Android mobiles (expect Android VR) so not 100% sure. In principle you can use the touch inputs to rotate the spring arm, which will result in the rotation of the camera.
thank you, subscribed and liked.
Thank you!
Hi Marco, Thanks for the great tutorial. Just wondering how you would work a boat running aground or scraping over shallows? Or say if the car drove over mud. I see in the comments you are thinking of doing a boat tute as well. The above and bouyancy / rocking with the waves would be awesome. Thanks again. Liked and subbed.
Hi @marcoghislazoni could you please tell me how this Kinematic car approach is compared with using the Chaos Vehicle?
With a kinematic approach you have full control on how the vehicle behaves independently from the physics engine. For example, you could easily add some drifting capabilities which with physics are extremely tricky to reproduce. On the other hand, when going the kinematic way you don't have full support for collisions or other interactions with physics simulating actors. Which one to choose (kinematic vs. physics, including Chaos Vehicles) depends on your application.
Loved the video :) but am having big troubles with getting the animation to work. I followed the video to a T but am getting an "Attempted to assign to None" error when it comes to introducing the animInstance to the BP_KinematicCar eventgraph. Some input would be massive! thankyou
Thanks, glad you enjoyed it. Double check that you are casting to the right AnimBP. Add a Print String after the cast to make sure it is working and not failing. Also double check that you actually assigned the AnimBP to the Skeletal Mesh in the vehicle BP.
Hey man, im getting everything to work except the steering wheel. I set everything up as in the video, but my steering wheel bone is face towards the front right tire (i dont know if thats important to know). I also put the model in blender and selected the wheel and pressed local, but none of the axis are changing (not like yours did that faced downwards more). However, even with that not working my wheel isnt making any movements at all. I set the bone in the eventgraph and followed everything 1:1. You have any idea what to do?
I went back to blender and got the axis like in the vid too but the steering wheel still wont rotate :(
I suspect your car is not rigged properly but hard to tell without seeing it.
I would like to see a continuation of this concept, I liked the video with the motorcycle, the implementation of engine sounds, what about the RPM, gearbox and the rest of this car?
The point of working with a kinematic vehicle is to have something easy to implement and control. By adding an engine simulation, a gearbox etc. things will get more complicated and it will become gradually difficult to link those properties (e.g. engine inertia, RPM, gear ratio, etc.) to the handling of the vehicle.
I think you are hinting more to a physics simulating vehicle where each part interacts with the other ones and the results are more realistic than arcady.
Eventually I will find an easy way to implement also such a vehicle and to make tutorials about it.
@@marcoghislanzoni Thank you very much, we are waiting for new lessons on vehicles on UE5 ))
@marco Hi Marco nice tut, everything does work as laid out in your video but i think there's a problem... Whenever i try to add a landscape, with a slight hill... or even add a few ramps... the vehicle stops dead... i think it has something to do with collisions, but why wouldn't the vehicle simply go up the ramp or slight raised bumps? FYI... i used a buggy vehicle so it has the lift to be able to climb/go over. Thanks much for any insight/help. Keep up the great work!
Yes, that happens because of collisions. In the current code there is no detection of the ground the car is running onto, so it cannot sense if there is a slope or ramp, adjusting the rotation to stay parallel to it. I plan to cover this in a future tutorial, but it is a matter of doing few line traces toward the ground and setting pitch and roll according to the returned hit normal.
@@marcoghislanzoni Thanks much Marco! Appreciate it! Really looking forward to your tut that covers that. I have searched for a month now.. and it seems arcade driving mechanics are not possible with the Chaos system in UE5... that or i am too new to understand the possibilities in UE5!
@@zalansari6454 It's definitely possible but while you have physics vehicles out of the box you don't get kinematic/arcadish one directly, you have to build them from scratch. This is the gap I am addressing with this series of tuts.
@@marcoghislanzoni Agreed Marco... though i will also state that as a very HUGE Noob... i have come across very many issues that put me in a very difficult situation while trying to learn UE... For example in UE5, the buoyancy functionality in LakeBody does not work... UE4 Physix's based tuts and steps are not easily replicable in UE5, especially if there's C++ involved. And tons of other things in UE5.
As a beginner, majority of the UE5 tuts are not detailed or cover the same topics as majority of the UE4 ones. I cant follow or make something, from UE4, in UE5 because, at some point, all of that UE4 will need to be migrated into UE5. Either you cant migrate it fully because of issues, broken code, functionality, and the longer you wait, the more issues you will run into for the migration.... Very frustrating and i feel lost.
@@zalansari6454 don't feel bad about it. UE5 is a massive game engine with tons of features and you cannot master them all in a short time frame, it's literally impossible. Plus UE5 is, respect to UE4, very new and it doesn't have yet the amount of tutorials/projects/documentation the previous version had. The best thing you can do is to keep working with it, ask questions on the forums/Discord, try, fail, try, fail, try, succeed! Good luck.
Hi @marcoghislanzoni could you please do a tutorial on 1. How to setup controls using the new Enhanced input system for cars and also one on setting up the finer details for the handling of the car. I've been trying to make an F1 car but it doesn't accelerate as fast as it should and the handling went from bad to worse 😅
That was fantastic! Would it be possible to have a brake lights tutorial?😁
Check out the standard Chaos Vehicles templates that ships with UE5. It has the code for the brake lights ready-made. You can port it over to this project.
@@marcoghislanzoni actually it is not clear how to assign the proper mesh to it
@@polygrind Your lights have to either be a separate mesh attached to the car or masked on the car's material. Check how they did it in the vehicle template.
@@marcoghislanzoni thank you very much, that's a great tip!
@@marcoghislanzoni now that I think of it, the light mesh is separate, basically a puck inside the glass. What I don't get is how does the sports car blueprint selects that specific mesh. Another issue is that, once I use the breaks and a random part of my car model changes material, it stays stuck that way until I restart the play sim.
Hey, I have one Question, I don´t get where the Steering Angle float (steeringwheel) gets is data from. Did I miss something? Where do I "connect" it to the actuall input axis?
Are you referring to the one inside the Animation Blueprint? We are setting that from the Event Tick in the portion starting at 44:49
On the other hand the one in the car BP we are setting from the input axis at 15:49
@@marcoghislanzoni ah I see! thank you! i missed that point
Hey Marco, I did look at your Blog and your contact info, but this does not appear to be functional.
better if you contact me on Discord as @vr_marco
The car moves along the x axis forward, which means it moves to the side!? is there a solution?
You may have imported it with the wrong orientation. The car should face the positive X direction (red axis).
Hello Marco, when I try to record in Sequencer the car movement I'm no being able to see the wheels rotating or steering from the anim blueprint, any idea of why this is happening?
If you record the skeletal mesh whatever animation the bones get should be recorded as well. When you play it back you need to make sure the recorded animation is assigned to the skeletal mesh.
@@marcoghislanzoni I'm recording the BP using keyboard inputs... Is it related to Player 0 definition?
@@noaguy5116 that’s fine, it should record it anyway. Maybe there is something not set up correctly on your side, but it is difficult to tell without seeing it.
@@marcoghislanzoni Ok will check it again, thank you so much!!
Hi, I wanted to ask how to make enhanced input work with this tutorial. I'm not exactly sure what to do since I am a beginner in unreal engine. I made the input actions and the mapping context but I don't know what to do next. Any help would be appreciated!
That's not easy to describe in full here. If you open the standard vehicle template which ships with Unreal Engine 5 you can see how it is done there for a car pawn. You can copy the same input system/events into this one and it should work. Also look at my Tank tutorial, that one shows how to use the new Enhanced Inputs.
@@marcoghislanzoni Thank you for your reply! I really appreciate it. Hope you have a wonderful day!
Hey there, great walkthrough, how would I import a car that has no wheels? I would like to keep the wheels separate so I can swap different wheels meshes but I just don't see a way to create wheel collisions without actual geo, must be missing something. Thanks!
You can have bones with no wheels in the SkM and parent some static meshes to the wheel bones, they will follow the animation.
When using the Enhanced Input system with the throttle and steering events, the speed and rotation never decelerate to 0, as the respective input events are completed before it has time to do so. Do you have an idea/solution to possibly solve this?
You have to set the target velocity to 0 on the Completed pin of the Input Action. Have a look at my recent tutorial on the Kinematic Tank, I am showing it there.
Hey there, loved this tutorial! It really helped me out with my project. But I'm a little stuck with a weird problem. You see, every time I turn to the right for example, my front wheels turn to the left in the opposite way which is strange cause I tried this once before on another car and I didn't had this problem. I followed this video step by step, detail to detail, but I couldn't solve it. Any idea how I can fix this? Thnxx
Hard to say, it may be that your wheel bones are reversed or the car is not aligned along the positive X axis. You can multiply the steering angle by -1 before passing it onto the Animation BP. See if that fixes it.
@@marcoghislanzoni I fixed it! I didn't notice I aligned it along the negative X axis in Blender. Thnxx for the help! Is there any platform(s) I can find you to give you credits for this?
Hi Marco! Loved your tutorial, I added a few extra animations and cameras and everything is right. Do you have any source in which I can learn how to aply different heights to the terrain so it´s not flat? Thank u for this awesome videos
Cool! If you can share a video with your progresses, I would love to see how it looks like. Regarding terrain detection, this is something I plan to cover in a future tutorial. Thinking of a tank or off-road vehicle.
@@marcoghislanzoni you can watch my progress in my Chanel. I also added lights to the car and a lap counter
@@marcoghislanzoni I uploaded it just yesterday
@@matiaslombardo8937 watched it, looking good!
@@marcoghislanzoni thanks!!
Please could you help me. I have been struggling with my vehicle for weeeeeks! I have an APC ported over from UE4 but no matter what I try, it won't work properly in UE5. The wheels bug out, and physics doesn't work, it either freezes in midair or slowly slips through the floor a bit. I don't know what to do anymore.
You may have scaling or rigging issues. Make sure the scale of your vehicle’s root bone is 1,1,1. If you see 100,100,100 that is your problem, then you need to fix it in an external program like Blender and reimport to Unreal.
@@marcoghislanzoni Thanks a lot. Where would I set/change the scale of the bones?
@@djtc2093 You need to do it in an external program (like Blender/Maya/Max) and then reimport into Unreal. In Blender, set the scene scale to 0.01, then scale up your mesh by 100, Apply Scale, export as FBX with scale 1.0 and import to Unreal also with scale 1.0.
@@marcoghislanzoni Thanks I will give it a bash. One more question, how would I animate a tank/APC turret? I have a working APC, that's drive able etc but I can't get the turret to move, what blueprint would I add that is equivalent to a chaos wheel blueprint to get the wheels working? Any suggestions?
Not animate but use the turret, to turn and shoot.
Hey Marco! Congratulations on your work!
Do you believe this methodology would apply to high poly models as well?
To record automotive scenes for tv advertisements, for example?
Visually yes (with some adjustments). Dynamically though there are a lot of nuances to making a realistic and believable vehicle simulation which would fit in a high quality advertisement. Drop me a line at my first name dot my last name at gmail dot com if you would like to chat about it more in details. Or contact me on Discord - Unreal Slackers as vr_marco#8894
Oh, thank you so much for your reply! Glad to know this is doable.
Reading about the details of the tech demo "The Matrix Awakens", I saw that the developers said that most of the cinematic scenes were shot capturing the "runtime action". The designers drove the cars through the streets of the set and later a cinematographic production methodology was applied to this captured action.
This sounded great to me and now I'm looking for knowledge to try to reproduce this workflow.
If it's not a problem, I'll email you.
@@riobaldo79 sure, feel free to get in touch.
I have a problem that I should have asked a long time ago I have followed your tutorial and other TH-camrs videos about making a car from game and I always get the car to work (driving, steering and etc.) but whenever I drive the car itself is always shaking, jittering all over the place. I have checked the physics, the model, I followed the steps that I had to follow when it comes to exporting from blender and still have no idea what is the problem, I usually use the simple vehicle movement set up.
I can think of two potential problems. One is internal collisions, where one part of the car gets in contact with another one causing instability. The other could be performance, where you have a lot going into your level which slows down the physics also leading to instability. Hard to tell without seeing how it looks like.
@@marcoghislanzoni Thanks for your response ,I believe its the first one because my level is empty and it only has the car in it, sorry but I deleted everything out of anger. So how can I go about fixing it do you think its a issue from blender or something I can fix in Unreal
@@victoirelotika8687 when rigging in Blender and importing into Unreal make sure the root bone comes in with a scale of 1,1,1. If the scale is 100,100,100 you will get problems with the physics. Check out my easy vehicle rigging tutorial with Blender.
@@marcoghislanzoni ok thank you so much
@@marcoghislanzoni I am able to get a video for you to see and this problem also happens even if I don't use bones in blender but let Unreal Auto generate bones for me. th-cam.com/video/urCFaHgzeZU/w-d-xo.html
Also the collision for the car isnt working :(
Collisions work but they just stop the car in place, they do not provided the typical “bounce” of a physical collision.
well this only works for me if the player isn't attached to the vehicle otherwise it just spins to the right, no idea what to do, on to yet another tutorial we go
Make sure you turn off the player collisions when attaching it to the car
It would be great if there was a steering wheel tutorial based on the defaults car blueprint
Do you mean to integrate a steering wheel and drive the car with it?
@@marcoghislanzoni actually no, It would be nice to have a complete animation blueprint that would include wheels and steering wheel, I've tried based on other tutorials and it doesn't seem to work. I'm testing the car for a small game. www.twitch.tv/videos/1801820084
Ciao Marco ho visto che 3 anni fa hai fatto un video sulla fisica di una moto, hai in programma di fare un tutorial relativo alla moto?
Ciao, si' e' proprio una delle cose che ho in mente! :-)
@@marcoghislanzoni Fantastico non vedo l'ora!
awesome content now please make a third person tutorial like this please please please
Third person? Like with a character?
@@marcoghislanzoni yes with a low poly character
Can you do this in Unreal Engine 4?
Yes you can
the collisions don’t seem to work at all in 4.26
I see no reasons why the collisions shouldn't work with 4.26. Are you sure about the settings?
@@marcoghislanzoni the collision isnt working for me either in 4.26 not sure why. the car goes through everything unless it collides with a physics actor which is the only time it acts with a collision. great tutorial though i didn't want to use the vehicle movement component and this definitely helped a ton but in my game i wanted to have inaccessible areas for the car with blocking volume but the car goes through it and now I'm stuck with this issue not knowing how to fix it :(
Thank you so much for this amazing tutorial, it helps me a lot! Do you have any suggestions on how to make more physical collisions? Because actually the kinematic car simply stops on the first static obstacle.
Collision related effects also need to be handled kinematically, for example by applying a backward movement for a certain time as soon as one is detected. This simulates an elastic collision taking place between the car and another actor.
@@marcoghislanzoni Oh I got it! With your code it should be easy for me.
Again, thank you!
Can you make some drift physic tutorial Please... :D
This has been on my todo for a while, but drifting physics isn't the easiest since, to make it consistent, you need a proper tire friction model and few other nuances. If it becomes a tutorial it is going to be a lengthy and complicated one. If I manage to find an easier way to implement a reliable and controllable drifting be sure I will share it.
Hi Did you sort out the drifting?
@@marcoghislanzoni
Yahhhhh .... bravo...!!!
That's not car physics. Where is inertia? Where is traction?
That’s why it is called “kinematic” otherwise it would have been called “dynamics”
also, wtf why would you make a car like this. Its so much work for a REALLY shitty result of a vehicle pawn
Do you understand what “kinematic” means?
nobody should follow this tutorial, there is a lot of info left out here and this is the absolute worst way to do this. keep searching google for different vehicle tutorials
Can you be more specific about which "info have been left out" and which kind of tutorial you were expecting given the fact that this is explicitly about creating a *kinematic* vehicle? I suspect you were looking for a tutorial about creating a physics vehicle. You should check out my other tutorials about Chaos Vehicles.