Impressive approach. My method was very similar when I started. Raycast wheels and Unity default wheel colliders have serious downsides. Also, for an easier setup - create a scriptable object to hold the values of your position spring and damper values. That will basically save your values so you don't have to memorize them.
Bro i saw your videos already. You did a great job. Actually i also wanted to make like yours but i don't have much experience. Can you please tell me or guide me what steps you took. Please ❤️
@@ashdev Like I said, I started the same way you did, our approach isn't that different - The biggest difference is I created a dynamic collider system that detects and handles collisions different from the standard unity way. You're on the right track. Just keep going. I'll be watching. :)
Great video! I'm struggling with finding a formula to calculate the opposite force to be applied. So traction can be applied. Also is that force applied directionally in a diagonal way or is it just applied from the side? I really really like the outcome you achieved and a the whole traction bit is confusing for me.
Its just a sideways force directly on the main car body. And it applied when the sideways velocity is greater than 0. You can control the amount of force as you like. You can control it like how fast the car is moving sideways and what amount you have to add. The force direction will be opposite of the sideways velocity
And i also made a vehicle physics asset. Watch the 3rd 4th latest video on my channel. If you want a full vehicle physics implemented. Then get it. Otherwise you can make your own. You can join my discord if you have any questions. discord.gg/8wJ6Zdfq
Interesting approach! I'm also trying to build a monster truck but I was using HingeJoints and their motors to drive the wheels. Well, it does not really work at all. The wheels start slipping even at low speeds and the truck does wheelies. Low or high friction, nothing really works. The rather complex suspension setup with the joints creates all kinds of problems due to imperfections in the physics simulation. I tried to do a naive but "realistic" implementation, but probably this really has to be faked to work as intended.
@@ashdev I want to ask you how you implement steering so that it works with the configurable joints suspension? I think in this situation I need to make the front wheels rotate at the given angle and then add a force to the wheels in the direction they are facing but I can't get it to work.
@@pharos640 this is arcade physics. I am adding force and torque directly on carbody to move and turn. Wheels are just there for suspension. And the meshes of wheels which are child of wheels rigid body i am rotation them according to speed. And turning their local rotation.
@Chawel William explaining coding will take a lot of time bro . Actually i made a playlist ( useful videos ) there is a video explaining code. You can check it and see how to write code. And mix it with my suspension method
@Chawel William I have college and working on a game so can't make such big video.. i am guiding you here. Maybe after my college i will be able to do youtube full time ❤️
@@vladlem4307 as i mentioned in this video i use torque directly on car body ,not on wheels. Wheels are just there for suspension. Don't do anything with wheels.
Can you please create a tutorial on 2D bike stunt game like Trial Xtreme, Trial Rising, etc. 2D game with 3D models. There is absolutely no tutorials on this topic and no assets at all.
@@ashdev Thank you, then I will wait for your asset. But I didn't able to find the video on insta. One more thing, In the video is this your original voice? Or you are using any tool or something?
@@Only4GamersXyz its Text to speach(AI generated). I was using a free trial but now its not available. So i use speechelo now. Paid.... The insta video is not with bike but its same as bike. 3rd video. Its not a good showing video but u can get an idea. You see the bike physics on the youtube? U can use that as 2d. And also if you want a 3d racing physics as explained in the video , i made a asset called Ash vehicle physics. You can check it too.(incase you need that in future)
Your game looks nice. I haven’t tried the configurable joints method before but i imagine it wouldn’t handle collisions very well. have encountered any issues with it?
Hi Ash, what is the blue contour around the tires? Is not exactly an outline.. it´s like a light.. How can I search to learn about this?? Post processing? And when you´ll realese Vehicle Physics 2? Thanks!
I have two questions: How do you calculate the sideways component of speed? And do you know how to spin the wheels appropriately? I noticed you suggested, in replies to comments, to apply rotation according to speed. I think it should also depend on whether the accelerator is pressed or not, and on how "drifty" the car is supposed to be (i.e. wheels should spin more when there's less traction). Do you know a simplistic way to calculate this stuff?
This is a arcade controller so all the details dosent matter that much. And the actual colliding wheels are not rotating the are sliding and its child meshes are rotating according to the speed. And when the camera is behind or in driver seat we can see the wheels. You can check my other videos how its looking. And also you can play a demo it will be in the description of one of the videos. And also i made a package of this vehicle physics. It will also be in description.
Hi, very nice explanation! I'm also a bit confused, as there seems to be different advice for which technique is better suited for arcade physics. I'm using Unreal Engine 5 with Chaos physics. And although it is easy to set up and going (it's kind of like you described here, with the bones method), it's is difficult to get an arcadey feel out of it. Although I can easily adjust he friction of the tyres to either slide or grip, it's all too sim-like. Others suggested to go for raycast or even a large sphere around the car, but your video shows that it can be done without those. Chaos even as options to get 'arcade-control' out of it, but is lacking in documentation what each setting is for. I was only able to find out what effect the stabilize controls had. For which I could see through the debug, it was actually creating a force in the opposite direction the car was trying go because of the physics, to counteract the control. Which does a good job at stabilizing the car and also keeping it grounded (if you checked the Z-axis aswell). So I'm actually quite close to that arcade control. Problem is, although I can get the car to drift with pulling the handbrake, it also loses momentum/speed, which makes it a pretty short drift. I need my cars to handle like in Split Second: Velocity. Steering should not decrease the speed and drifting should be able to be done while continue moving forward. Since you're working in Unity, you probably can't help me directly, but do you know of helpfull resources which can help me set it up? Most I come accross are just showing their demo, but not showing how they done it. Coding isn't my strongpoint anymore, so I'm trying it with a combination of the Chaos physics and BluePrints. Cheers.
Hey man, the video's great. I wanna know as to how you got the wheels turning. I added a simple script to the car's root parent object that performs an AddForce function, but it doesn't move because of the wheels.
@@ashdev What about the steering? I was able to code friction for forward and backward movement, but steering is still slippery as hell. Did you use any equation for adding friction for steering?
Hi I don't understand how by blocking the rotation of the wheel it can turn/roll by applying a force. Personally I locked the motion of the configurable joint like you said (and put a physic material) but the wheels don't want to turn despite the movement of the vehicle ... and if i put the motion to free, it do anything
How did you turn the wheels with Rigid body?. If I turn the wheels, the car would go flying, I froze the unnecessary rotations but still doesn't work. But suspension and Forward-backward movement works. Please help me with the rotation of the wheels.
After following the instructions, my wheels slide along the car body - any idea why that's happening? The suspension works well, but eventually the car slides forward, as if it's sitting on top of the wheels instead of actually connected to them.
Ya the wheels will slide .you have to add 0 friction to wheels. And separate wheel mesh and rigidbody. And rotate the mesh according to the speed each frame. I also made a full vehicle physics asset. You can check description. Ash vehicle physics.
Hello, do you know what is the difference between raycast and joints from a performance point of view? I work on mobile and performance is very important.
Well to use joints you have to use rigidbody. Then you have 4 extra rigidbodys for wheels it will effect performance but in case of raycast there you need 4 extra raycasts then. I don't know raycast uses more calculation or jionts but i also tried on mobile and works fine no lag so far... I will test this further tho and make a video later 👍
How do you figure out how much force is applied to each wheel, so you can apply the correct forces when driving? With a raycast suspension, you can just use the forces you apply to the car in order to get it to the correct position, but I can't figure out how to determine the correct forces when using a configurable joint.
@@ashdev What I meant is: What formula do you use to calculate the lateral forces on the wheels when turning? How do you get the normal-forces applied to the wheel by the ground? With a custom raycast-suspension from car-body and straight down, you get the value automatically (as in the forces the suspension applies to the car body to get it to not hit the ground), but the Unity Joint doesn't seem to allow fetching that value. Btw. I much appreciate that you take the time to answer questions :-)
@@thorhelms2634 no i am not using raycast. Thats the thing . For suspension you dont have to code. You have to attach configurable joints to wheels and the connected body will be the mein vehicle rigid body .did you watched the video carefully? I gone too fast i guess. You have to lock every motion except the y motion in joint settings. Then y drive settings... Works as a spring.
And when turning ,i mean if the sideways velocity is nonzero then we add a force on the car in the opposite direction of the sideways velocity. And the amount will be set by you.
@@ashdev The video is fine, I'm asking about stuff that is outside the scope of the video :-) When turning, how big are the forces you apply to the car? What formula do you use to calculate that force?
We are adding sideways force depending on sideways velocity. So its not letting vehicle slide sideways. Its just cancelling sideways moment. And we are adding forward force so it will result in a turn if we add torque to vehicle.
2 years latuur .. any chance of a more in depth tutorial? Most have either wheel colliders or like a single sphere collider ... and that is either very cmplex or very limited in scope (so when you add a jump or boost those controls tend to flip out ...also very limited control over the look and feel)
I am going to make a video but don't know when. It will be on how i made my sim-cade vehicle physics asset. Method discussed in this video is used in my ash vehicle physics package. Link in description.
@ashdev honestly looking at all the paid tutorials , if I compare that with your asset (just bought it from the unity store) ... I would buy a tutorial you'd make on this subject in a heartbeat. I am not even talking about level building or track logic etc ... just how to build a proper car rig would be enough 😀 I tried to reverse engineer it... but it is a bit beyond me ... I did manage to hook in gamepad controls and a custom function ( turbo boost)... but that is about it
@@martinvanstein.youtube i think i should make a course on it. Lot of people are asking for it. I was thinking about it also but it takes lot of efforts. I will have to learn how to talk and make a script for the course.
@ashdev yeah you should :) Just use this video as a template , as you explain how it works on a toplevel pretty well... and then expand on it... don't worry about the voice or how you talk either.. the quality of your work is good enough to compensate for any accent!!!
@@ashdev I did and that's why I asked. my car shakes back and forth like crazy and so did my camera. it's driving me crazy. but when I tried using unity 2018 its better, but unity 2018 is not good with URP
@@ashdev I wish you would teach me step by step (code wise) how to make playable car just like in the video. I just started learning unity and blender and the wheelcollider destroyed my motivation
hey just wanted to ask. is this how you hanled friction? Vector3 frictionDir = new Vector3(-rb.velocity.x, rb.velocity.y, rb.velocity.z); rb.AddForce(frictionDir * Friction);
Your concept is correct but implementation is wrong. That rb.velocity is in world space. You need in local space. Force direction will be car.right or left. Depending on sideways velocity (which side its sliding). And magnitude depends on you. By the way this has been implemented in Ash vehicle physics with more functionalities (link in description). If you want to see full code you can get it.
Impressive approach. My method was very similar when I started. Raycast wheels and Unity default wheel colliders have serious downsides.
Also, for an easier setup - create a scriptable object to hold the values of your position spring and damper values.
That will basically save your values so you don't have to memorize them.
I did 😉 thanks 👍
Bro i saw your videos already. You did a great job. Actually i also wanted to make like yours but i don't have much experience. Can you please tell me or guide me what steps you took. Please ❤️
@@ashdev Like I said, I started the same way you did, our approach isn't that different - The biggest difference is I created a dynamic collider system that detects and handles collisions different from the standard unity way. You're on the right track. Just keep going. I'll be watching. :)
@@StudioTatsu thanks 👍❤️
@@StudioTatsu but your vehicle physics is so realistic. How you made it. Any guidance
i was the one who gave pocket wheels the idea of grappling hooks in a car gam! so stoked to see someone talk about that game!
nice
Great explanation of torque and why it important. Also I really like the monster truck and course.
Thank you so much. Glad you like it.❤️
Man, you just save me from missed deadline. BIG THANKS!!!!
Nice 👍🙂
Great video! I'm struggling with finding a formula to calculate the opposite force to be applied. So traction can be applied. Also is that force applied directionally in a diagonal way or is it just applied from the side? I really really like the outcome you achieved and a the whole traction bit is confusing for me.
Its just a sideways force directly on the main car body. And it applied when the sideways velocity is greater than 0. You can control the amount of force as you like. You can control it like how fast the car is moving sideways and what amount you have to add. The force direction will be opposite of the sideways velocity
And i also made a vehicle physics asset. Watch the 3rd 4th latest video on my channel. If you want a full vehicle physics implemented. Then get it. Otherwise you can make your own. You can join my discord if you have any questions.
discord.gg/8wJ6Zdfq
@@ashdev hello where do i find the 4th video
@@superfunnypranks463 not yet made
ok
Interesting approach!
I'm also trying to build a monster truck but I was using HingeJoints and their motors to drive the wheels. Well, it does not really work at all. The wheels start slipping even at low speeds and the truck does wheelies. Low or high friction, nothing really works. The rather complex suspension setup with the joints creates all kinds of problems due to imperfections in the physics simulation. I tried to do a naive but "realistic" implementation, but probably this really has to be faked to work as intended.
I got it by the way. ruclips.net/video/iHB9uBNGJAQ/видео.html
Great how u used such awesome examples!
Thank you brother ❤️
Thank you I was searching for a video like this one for days.
happy to help
@@ashdev I want to ask you how you implement steering so that it works with the configurable joints suspension? I think in this situation I need to make the front wheels rotate at the given angle and then add a force to the wheels in the direction they are facing but I can't get it to work.
@@pharos640 this is arcade physics. I am adding force and torque directly on carbody to move and turn. Wheels are just there for suspension. And the meshes of wheels which are child of wheels rigid body i am rotation them according to speed. And turning their local rotation.
Abd by the way this is available as a asset on asset store. Check description.
@@ashdev Thank you for the information and im going to check the asset.
Great explanation. I was looking for a long time to make car controller like this.
There you go 👍 feel free to ask questions
@@ashdev Yeah sure......👍
Can't wait to see more of these tutorials
@Chawel William explaining coding will take a lot of time bro . Actually i made a playlist ( useful videos ) there is a video explaining code. You can check it and see how to write code. And mix it with my suspension method
@Chawel William I have college and working on a game so can't make such big video.. i am guiding you here. Maybe after my college i will be able to do youtube full time ❤️
Thank you very much for the shoutout! I really like your method, it seems to be very flexible and looks really good.
Thanks ❤️
ok, you made the suspension of the car, but how do you make the wheel spin?
Thank you, I have been looking for this lesson for many years
U R welcome ❤️🖖
Can you do a lesson about the car controller physics?
What do you mean by car controller physics. I think i explained that in this video.
@@ashdev Do you apply rotation torque to car rigidbody or apply force to wheels? How do you rotate car?
@@vladlem4307 as i mentioned in this video i use torque directly on car body ,not on wheels. Wheels are just there for suspension. Don't do anything with wheels.
This is pure gold, thank you
🖖
this is so simple and clear. Great video!!
Thanks
Can you please create a tutorial on 2D bike stunt game like Trial Xtreme, Trial Rising, etc. 2D game with 3D models. There is absolutely no tutorials on this topic and no assets at all.
I am making a asset tho... On 2.5D you can check my Instagram for video.
instagram.com/ash_dev18?igshid=1i8lkx42xed8m
@@ashdev Thank you, then I will wait for your asset. But I didn't able to find the video on insta. One more thing, In the video is this your original voice? Or you are using any tool or something?
@@Only4GamersXyz its Text to speach(AI generated). I was using a free trial but now its not available. So i use speechelo now. Paid....
The insta video is not with bike but its same as bike. 3rd video. Its not a good showing video but u can get an idea. You see the bike physics on the youtube? U can use that as 2d. And also if you want a 3d racing physics as explained in the video , i made a asset called Ash vehicle physics. You can check it too.(incase you need that in future)
how did you Rotate the wheels when you set their angular motion locked?
thank you
also which rigidbody function did you use to add force
Your game looks nice. I haven’t tried the configurable joints method before but i imagine it wouldn’t handle collisions very well. have encountered any issues with it?
Yes but i solved them. You can play a demo i made. Its in the description of one of the latest videos. And also made a asset with it.
Hi Ash, what is the blue contour around the tires? Is not exactly an outline.. it´s like a light..
How can I search to learn about this?? Post processing?
And when you´ll realese Vehicle Physics 2?
Thanks!
I don't know what you are talking about. And i have released sim-cade vehicle physics.
@@ashdev Hi again!
In 6 min video, when the car makes stunts on the ground, the tires have a blue contour.
I thought a cool effect!
@@BOT1001_ thats not effect just lighting. And its material has smoothness
I have two questions:
How do you calculate the sideways component of speed?
And do you know how to spin the wheels appropriately? I noticed you suggested, in replies to comments, to apply rotation according to speed. I think it should also depend on whether the accelerator is pressed or not, and on how "drifty" the car is supposed to be (i.e. wheels should spin more when there's less traction). Do you know a simplistic way to calculate this stuff?
This is a arcade controller so all the details dosent matter that much. And the actual colliding wheels are not rotating the are sliding and its child meshes are rotating according to the speed. And when the camera is behind or in driver seat we can see the wheels. You can check my other videos how its looking. And also you can play a demo it will be in the description of one of the videos. And also i made a package of this vehicle physics. It will also be in description.
Also the sideways component is how much velocity the car has in the side axis of car. Transform.right
Cool stuff, thank you for the tutorial
Hi, very nice explanation! I'm also a bit confused, as there seems to be different advice for which technique is better suited for arcade physics.
I'm using Unreal Engine 5 with Chaos physics. And although it is easy to set up and going (it's kind of like you described here, with the bones method), it's is difficult to get an arcadey feel out of it. Although I can easily adjust he friction of the tyres to either slide or grip, it's all too sim-like. Others suggested to go for raycast or even a large sphere around the car, but your video shows that it can be done without those.
Chaos even as options to get 'arcade-control' out of it, but is lacking in documentation what each setting is for. I was only able to find out what effect the stabilize controls had. For which I could see through the debug, it was actually creating a force in the opposite direction the car was trying go because of the physics, to counteract the control. Which does a good job at stabilizing the car and also keeping it grounded (if you checked the Z-axis aswell). So I'm actually quite close to that arcade control. Problem is, although I can get the car to drift with pulling the handbrake, it also loses momentum/speed, which makes it a pretty short drift. I need my cars to handle like in Split Second: Velocity. Steering should not decrease the speed and drifting should be able to be done while continue moving forward.
Since you're working in Unity, you probably can't help me directly, but do you know of helpfull resources which can help me set it up? Most I come accross are just showing their demo, but not showing how they done it. Coding isn't my strongpoint anymore, so I'm trying it with a combination of the Chaos physics and BluePrints.
Cheers.
ruclips.net/video/LG1CtlFRmpU/видео.html
ruclips.net/video/Db1AgGavL8E/видео.html
Hey man, the video's great. I wanna know as to how you got the wheels turning. I added a simple script to the car's root parent object that performs an AddForce function, but it doesn't move because of the wheels.
Yes wheels are not rotating... Make a child object to wheels and add wheel meshes in it and rotate it according to the speed of the car.
@@ashdev What about the steering? I was able to code friction for forward and backward movement, but steering is still slippery as hell. Did you use any equation for adding friction for steering?
@@L3RNA3AN use tranform.rotate
Hi
I don't understand how by blocking the rotation of the wheel it can turn/roll by applying a force. Personally I locked the motion of the configurable joint like you said (and put a physic material) but the wheels don't want to turn despite the movement of the vehicle ...
and if i put the motion to free, it do anything
U have to rotate the wheel mesh seperately. Make the physics body and mesh body different. And rotate the mesh according to the speed of car
@@ashdev oh ok thanks 👍😄
How did you turn the wheels with Rigid body?. If I turn the wheels, the car would go flying, I froze the unnecessary rotations but still doesn't work. But suspension and Forward-backward movement works. Please help me with the rotation of the wheels.
Make the wheel mesh and rigidbody different and rotate the mesh according to the speed of car
Do you believe such a setup can work with two or one-wheeled vehicles, like bikes (what about balance?) or even hovervehicles?
Yes bro i made it ... Watch the latest videos
After following the instructions, my wheels slide along the car body - any idea why that's happening? The suspension works well, but eventually the car slides forward, as if it's sitting on top of the wheels instead of actually connected to them.
Ya the wheels will slide .you have to add 0 friction to wheels. And separate wheel mesh and rigidbody. And rotate the mesh according to the speed each frame. I also made a full vehicle physics asset. You can check description. Ash vehicle physics.
@@ashdev thank you!
Hello, do you know what is the difference between raycast and joints from a performance point of view? I work on mobile and performance is very important.
Well to use joints you have to use rigidbody. Then you have 4 extra rigidbodys for wheels it will effect performance but in case of raycast there you need 4 extra raycasts then. I don't know raycast uses more calculation or jionts but i also tried on mobile and works fine no lag so far... I will test this further tho and make a video later 👍
what a great tutorial
How do you figure out how much force is applied to each wheel, so you can apply the correct forces when driving? With a raycast suspension, you can just use the forces you apply to the car in order to get it to the correct position, but I can't figure out how to determine the correct forces when using a configurable joint.
Follow the exact steps discussed. You will find your spring value by trial and error. Watch again and you will get it.
@@ashdev What I meant is: What formula do you use to calculate the lateral forces on the wheels when turning? How do you get the normal-forces applied to the wheel by the ground? With a custom raycast-suspension from car-body and straight down, you get the value automatically (as in the forces the suspension applies to the car body to get it to not hit the ground), but the Unity Joint doesn't seem to allow fetching that value.
Btw. I much appreciate that you take the time to answer questions :-)
@@thorhelms2634 no i am not using raycast. Thats the thing . For suspension you dont have to code. You have to attach configurable joints to wheels and the connected body will be the mein vehicle rigid body .did you watched the video carefully? I gone too fast i guess. You have to lock every motion except the y motion in joint settings. Then y drive settings... Works as a spring.
And when turning ,i mean if the sideways velocity is nonzero then we add a force on the car in the opposite direction of the sideways velocity. And the amount will be set by you.
@@ashdev The video is fine, I'm asking about stuff that is outside the scope of the video :-) When turning, how big are the forces you apply to the car? What formula do you use to calculate that force?
Hey man this looks great! Are you still planning to make an asset on the assetstore? If not I would like to buy this monster truck example from you.
Already made. Link in description. "Ash vehicle physics"
devious
Hey just wanted to ask if the angular x motion is free and if not then how do you rotate the wheels.
Not rotating the rigidbody. But rotation the mesh. Its child
How do you steer the front wheels so the car can change direction?
I turn mesh of front wheels. But has no effect on physics.
I add torque directly on car to rotate car.
@@ashdev Thank you very much
Wouldnt turning not work cause with sideways friction it would just stop current momentum but not transfer it into the desired turn?
We are adding sideways force depending on sideways velocity. So its not letting vehicle slide sideways. Its just cancelling sideways moment. And we are adding forward force so it will result in a turn if we add torque to vehicle.
What if your rolling tho? Would you have to add small torque every time your rolling?
I mean if im not applying torque to the vehicle and its just sliding. Or are you supposed to add forward friction too just like sideways?
Nvm just rewatched your explanation for turning : ( im dumb
@@Zoomrail there is no forward friction here. If vehicle is just sliding sideways the force will stop it. In sideways direction
2 years latuur .. any chance of a more in depth tutorial?
Most have either wheel colliders or like a single sphere collider ... and that is either very cmplex or very limited in scope (so when you add a jump or boost those controls tend to flip out ...also very limited control over the look and feel)
I am going to make a video but don't know when. It will be on how i made my sim-cade vehicle physics asset.
Method discussed in this video is used in my ash vehicle physics package. Link in description.
@ashdev honestly looking at all the paid tutorials , if I compare that with your asset (just bought it from the unity store) ... I would buy a tutorial you'd make on this subject in a heartbeat.
I am not even talking about level building or track logic etc ... just how to build a proper car rig would be enough 😀
I tried to reverse engineer it... but it is a bit beyond me ... I did manage to hook in gamepad controls and a custom function ( turbo boost)... but that is about it
@@martinvanstein.youtube i think i should make a course on it. Lot of people are asking for it. I was thinking about it also but it takes lot of efforts. I will have to learn how to talk and make a script for the course.
@ashdev yeah you should :)
Just use this video as a template , as you explain how it works on a toplevel pretty well... and then expand on it... don't worry about the voice or how you talk either.. the quality of your work is good enough to compensate for any accent!!!
@@martinvanstein.youtube thanks i will 👍
Why don't you use wheelcollider?
Did you used them? If you do then you know how weird/bad they are. Very hard to get them right. And does not behave as we like.
@@ashdev I did and that's why I asked. my car shakes back and forth like crazy and so did my camera. it's driving me crazy. but when I tried using unity 2018 its better, but unity 2018 is not good with URP
@@dianjakap4805 thats the problem
@@ashdev I wish you would teach me step by step (code wise) how to make playable car just like in the video. I just started learning unity and blender and the wheelcollider destroyed my motivation
Good video!
:D
Jesus is coming back, God bless!
Can you also make a script for it
i made an asset of it link in description.
could you make a downloadable file , so we can clearly understand the script and other all parts , thank you
Sorry but this vehicle physics is available as a package on unity asset store. You can check the link in description.
Can you share the script atleast?
@@sri_j1683 bro scripts are the main part of it
@@ashdev ya 🤣 no problem thank you , great video .
can i have the code
Its available on asset store. Link in description
i invite to see my game if u like
You are from India? right.
but your accent looks like american
Haha 😂 its not my voice... Its ai generated text to speech
@@ashdev I am on your discord come live
ashdev copyer
hey just wanted to ask.
is this how you hanled friction?
Vector3 frictionDir = new Vector3(-rb.velocity.x, rb.velocity.y, rb.velocity.z);
rb.AddForce(frictionDir * Friction);
Your concept is correct but implementation is wrong. That rb.velocity is in world space. You need in local space. Force direction will be car.right or left. Depending on sideways velocity (which side its sliding). And magnitude depends on you.
By the way this has been implemented in Ash vehicle physics with more functionalities (link in description). If you want to see full code you can get it.
@@ashdev ok thanks for the explanation really helps out. thanks.