I was so afraid to scroll down and see "video upload date: 5 years ago" Subscribed!
@uniquelyrics23314 жыл бұрын
lol
@matheusmartins31773 жыл бұрын
me too LOL
@monkeyrobotsinc.98753 жыл бұрын
i HATE that.
@federic.d.souza743 жыл бұрын
lol
@3bomb3 жыл бұрын
Just a quick heads up, this script is using negative motor torque to handle braking when pressing "S." Per Unity's documentation, negative motor torque should not be used for braking. If you'd like to apply brakeTorque instead of negative motorTorque, create an if statement that says if verticalInput < 0 then brakeTorque = -verticalInput * brakeForce.
@vilmerforsberg Жыл бұрын
in which part of the scrpit should you put this? btw i really liked your car video:)
@T0MM0-Lds3 жыл бұрын
As much as all the information is there and it's fantastic to use. Please remember this is a tutorial; not a speed run.
@hawkgamedev2 жыл бұрын
there is also "Playback Speed" and "pause the video" you know ...
@T0MM0-Lds2 жыл бұрын
@@hawkgamedev wow thanks! Never knew that was there! ❤️ Pillock
@hawkgamedev2 жыл бұрын
@@T0MM0-Lds you are welcome poor fish.
@himanshuVisuals2 жыл бұрын
my car dont turn left and right
@hawkgamedev2 жыл бұрын
@@himanshuVisuals hey man share in your discord I'll help you.
@RandomNovaGames4 жыл бұрын
Maybe the first video that I have seen that teaches you to create a nice car handling for free. Good place for me to start. Others dont handle well at high speeds
@rubenopenworld84054 жыл бұрын
I mean yes you are doing things and i guess it works for experienced users of unity but you should explain more why you would do certain steps, idk when i would try this for some other thing i would not remember how to do it
@nahiyanalamgir70563 жыл бұрын
Agreed. I think the main problem is that these tutorial producers write code continuously without running the game to show the results at every step. Instead they probably just write the entire code at once before making the videos and copy every line from there, explaining each line lightly.
@monkeyrobotsinc.98753 жыл бұрын
im somewhat experienced and i still had to pause the video every 2 and a half seconds to catch up with the typing. hes crazy.
@dradex95623 жыл бұрын
@@monkeyrobotsinc.9875 you know he sped up that part right????
@samochreno3 жыл бұрын
@@monkeyrobotsinc.9875 you have to be kidding, if youre somewhat experienced you should be able to catch up with this easily
@carolineyonatan2164 жыл бұрын
Lol i see this ad while watching dani
@swastikmishra88224 жыл бұрын
Same bro
@vvixell14 жыл бұрын
same
@neongreggyyt11154 жыл бұрын
Same
@suanzalal4 жыл бұрын
Ah. I see you're a Boner aswell.
@youdaily71134 жыл бұрын
Ssssssnanananana same
@axer10153 жыл бұрын
Man only problem is YOU GO TOO FAST! GO SLOWER!
@1agent3LT3 жыл бұрын
yea
@jorande1e3 жыл бұрын
The pause button exists
@Fellamemer2 жыл бұрын
Or just leave the world
@Rodehaas2 жыл бұрын
0.5x speed?
@luiss.20053 жыл бұрын
I really like this tutorial because you show some common mistakes and how to avoid them. For example: setting the box collider incorrectly or using Lerp insead of SmoothDamp. Unity is not a black box where you input the correct values and everything works just fine. Making games (or anything, really) is iterative. I think showing the process can be very encouraging for beginners.
@joooosl3 жыл бұрын
What did you use in HandleRotation? There is no SmoothDamp
@luiss.3866 Жыл бұрын
Are we brothers?
@TheEdugato1003 жыл бұрын
im a simple beginner, i just want my cube to move...
@froosx94183 жыл бұрын
well that's pretty easy i can actually send u the script if you'd like
@isaiahcancode26493 жыл бұрын
@@froosx9418 please show me
@isaiahcancode26493 жыл бұрын
nvm i already know how to
@DARK_AMBIGUOUS3 жыл бұрын
Use bolt and then open the flow graph and make ad a thing called “on keyboard input” and then add a “position translate” thing and then make it so everyone you press W it moves the cube 1 on the x axis, and do the same thing with S but make it move -0.5 or -1 and then add a rotation translation thing and make it so it rotates 1 on the Z axis when you press A
@gamer-revolution3 жыл бұрын
ok i am just like dani i only copy tutorials and not learn
@lawrenceredmacher43822 жыл бұрын
I've found that changing suspension spring target position to 1 makes the car basically unable to flip over. or change it to 0 to make it super easy to flip :D
@bopark1783 Жыл бұрын
This is really awesome video for newbie! Everyone in the youtube just skips parts of how to setting up the objects and not fully explain how each code works. But this video is really kind to explain how to take each steps!!
@IGNACY-fp8zo2 жыл бұрын
The wheels just instantly fly off and sink below the ground for me and for some reason the breaks seem to accelerate the flying wheels
@kavipriyank82982 жыл бұрын
Totally the same here! For me, the wheels seem to detach from the car's body in a weird manner and fly away. Its transform keeps changing constantly, while the car's body just falls down on land.
@markpolak86224 жыл бұрын
You are missing the brakek force reset, the if(isBraking) {applybreak()} is wrong because, the 0f breakforce never applies, it means once you braked the car just stops and cant go anywhere, you shoul always apply the bake
@jacobpatron83874 жыл бұрын
@PRANAY G.V. Inside the HandleMotor() function you could add this code to fix that bug, you may have already figured out a solution but hopefully it can at least help someone else. Basically, this code checks if isBreaking is false, if it is it sets the brakeTorque for each wheel to 0. if (!isBreaking) { frontRightWheelCollider.brakeTorque = frontLeftWheelCollider.brakeTorque = backRightWheelCollider.brakeTorque = backLeftWheelCollider.brakeTorque = 0f; }
@MrLiam1113 жыл бұрын
@PRANAY G.V. Just remove the IF from the ApplyBreaking method
@rahulprasad89063 жыл бұрын
@@jacobpatron8387 thank you!
@tejaskale68233 жыл бұрын
@@jacobpatron8387 thankyou soooo much dude
@bamers4043 жыл бұрын
@@jacobpatron8387 thanks 🙏
@nikkuzmich53783 жыл бұрын
Great tutorial! I did the same with my car, but I had one strange problem: my wheels do not rotate around themselves, they rotate in a circle with a certain radius... I solved this by creating empty objects in the same place as wheels, and used them as transforms. But I think this is not an ideal solution, as in a collision the wheels are raised... and not lowered.
@hdprodesignteam2313 жыл бұрын
Hi Niaz. Check this links: Hope helps. kzbin.info/www/bejne/fIfZXpt7l6mEd8U kzbin.info/www/bejne/fZ3EoJyQbZV-mbc Playable Demo : drive.google.com/file/d/1_JnQSfTP8E7EfKZhJVdClohhxBQ7cgei/view?usp=sharing Kindly waiting for your comments to improve it. Thanks.
@forgodsakejake2 жыл бұрын
i had the exact same issue, was trying to find a solution for so long so thank you for this
@vincenthornak74692 жыл бұрын
@@forgodsakejake I am still confused on how they got this working... I am having the exact same issue. Any tips?
@gglobensky2 жыл бұрын
It's because the pivot point of the object is not in the center. Just parent the mesh onto a gameObject with the right pivot and move all the scripts to the empty parent you just created.
@lostsoop3 жыл бұрын
How can i change the speed / acceleration of the car?
@matymare3 жыл бұрын
Change motor force amount
@lostsoop3 жыл бұрын
@@matymare it doesnt help ig but thank you anyways
@barebones.3 жыл бұрын
if you want to make it slower then you can increase drag ( 1 - 3 will probably be as high as you can go ), but im not sure how to make it faster.
@lostsoop3 жыл бұрын
@@barebones. i think the car falls over when i increase the drag
@Max-kb6ui3 жыл бұрын
@@lostsoop Same problem
@ElectronGOD4 жыл бұрын
Once the BrakeTorque is applied, car does not move again when I release the break. Plz help.
@GameDevChef4 жыл бұрын
You can try to remove the isBreaking check on line 45 and make sure that the brakeTorque is set to 0 when spacebar is not pressed.
@boinas4 жыл бұрын
you can try to do this: private void HandleMotor() { if (isBreaking) breakForce = 3000; else breakForce = 0; frontLeftWheelCollider.motorTorque = verticalInput * motorForce; frontRightWheelCollider.motorTorque = verticalInput * motorForce; currentBreakForce = isBreaking ? breakForce : 0f; // you don't need this part because of the if and else you do upper ApplyBreaking(); } ApplyBreaking () { // right there i don't put all wheel colliders! the type of wheel colliders you put here is according to the traction you want to put in the car! // I put for a RWD car (rear-wheel drive)! the video is made for AWD car (all-wheels drive)! // It's to everyone's taste! ;D rearLeftWheelCollider.brakeTorque = currentBreakForce; rearRightWheelCollider.brakeTorque = currentBreakForce; } This method works but if you want a clean and more professional code try to do the wheels colliders with lists! and you can call the wheels with a simple foreach! And carefull because "break" writes "brake"! it's normal this type of errors while programming! especially if you're not english! i can't talk about this because even I do this type of errors! but if you want a correct code try to change "break" and "breaking" to "brake" and "braking"! But sure it was a good tutorial! Congratulations GameDevChef! Keep like that! One more like! 👍 =D
@GameDevChef4 жыл бұрын
I found the problem. Remove the isBreaking check on line 52 in Car Controler script. That should make it work
@shivamchhapola52454 жыл бұрын
@@GameDevChef can you explain why it works without the check
@counterpointerz-rocketleag20383 жыл бұрын
thanks, you guys will definitely need to do some research about the different things he did, but coding is all about teaching yourself
@elitebooger82084 жыл бұрын
So my car just flys threw the air and I changed the weight on the wheels and body.
@musicland57864 жыл бұрын
Just add a component (rigid body)
@diliupg3 жыл бұрын
congratulations on the flying car! :-D
@theplaymakerno13 жыл бұрын
Got please you mate. This script is better than most of the bloated crap we find on the asset store.
@joshuastoddard35562 жыл бұрын
Super Helpful!!! By the way if you make the engine to powerful it the car will flip. I made a little script to fix that though. Script: using System.Collections; using System.Collections.Generic; using UnityEngine; public class Flip : MonoBehaviour { void Update() { if (Input.GetKeyDown(KeyCode.V)) { transform.rotation = Quaternion.Euler(0, 0, 0); } } }
@walney20084 жыл бұрын
very good, I'm a beginner, I'm from Brazil, I learned to put the car in motion, thank you very much, would there be a video teaching you how to create a race track for you, have a lap counting system and checkpoints?
@timhoutman64133 жыл бұрын
5:35 love the way how you say motor torques. Thanks for the video man.
@tonyhamilton77853 жыл бұрын
This is hella advanced. All I need is to make the car turn left & right when moving
@saiyanpridezbudokitenkaich34443 жыл бұрын
Its not advanced if u understand c# but this guy speaks faster than 6000 MotorTorque
@BerzahMusic3 жыл бұрын
lol
@bamers4043 жыл бұрын
Then a car game is not for you. Because it's all bout physics
@tonyhamilton77853 жыл бұрын
@@bamers404 Not really. I learned a lot over these months. Even the best programmers have to google how-to and error videos. Its all about following instructions to know how to do it in the future. I made a car game and got it working, but I scratched it for other ideas
@FelineRaptor-gv4te3 жыл бұрын
If you want it so simple without proper physics, then try this- using System.Collections; using System.Collections.Generic; using UnityEngine; public class MyCarController : MonoBehaviour { public float maxSpeed = 30f; // Our maximum speed allowed. public float curSpeed; // Current Speed; public float applySpeed = 20f; // How much force to apply (Forward). public float brakeForce = -10f; // Breaks. public Rigidbody myRigid; // Our Rigidbody. public int turnAmount; void Start() { myRigid = GetComponent(); // Gets the players Rigidbody. } void FixedUpdate() { curSpeed = myRigid.velocity.z; if(curSpeed >= maxSpeed) { applySpeed = curSpeed; } if(Input.GetKey(KeyCode.UpArrow)) { //Apply Accelleration myRigid.AddRelativeForce(Vector3.forward * applySpeed); } if(Input.GetKey(KeyCode.DownArrow)) { //Apply BREAKS myRigid.AddRelativeForce(Vector3.back * brakeForce); } } void Update() { if(Input.GetKey(KeyCode.A)) { transform.Rotate(Vector3.up * -turnAmount * Time.deltaTime); } if(Input.GetKey(KeyCode.D)) { transform.Rotate(Vector3.up * turnAmount * Time.deltaTime); } } This wasactually a script for flying a plane in a post in Unity Answers but I tweaked the script to make it a car controller. Just remember to add a rigidbody [with mass 1] to your car GameObject and a box collider with a suitable size and position. Any problem wiht the script, ask me.
@bowl18583 жыл бұрын
Good tutorial, one question. When I start moving my car, once it gets to a certain speed it starts jittering side to side really quickly and leans to the left. My wheels are all at the same y axis, and tinkering with the settings is doing nothing. How do i fix this????
@Rikko2303923 жыл бұрын
I have same problem
@Jimblesnitronbo2 жыл бұрын
I had the same problem too, but whenever I change the mass in the car's "Rigidbody" component, it fixes it! Hope this helps!
@MphasieMusic3 жыл бұрын
OMG THANK YOU! You saved my project
@Vetrillum2 жыл бұрын
Thanks, it worked! But the rear wheels are rotated at Y180, please help
@ghostawader92282 жыл бұрын
Sorry I'm totally new to programming but why doesnt the Input.GetAxis and the Input.GetKey(Keycode.....) change color when I write it down on C# the exact same way he did it at 4:01. I noticed it happens to more rows aswell
@ghostawader92282 жыл бұрын
It even gives me a warning about it at the bottom in a red text
@usman48544 жыл бұрын
2:04 sir simple is mesh collider because box colliders used in building and etc things
@aarushsharma97644 жыл бұрын
How I control this
@usman48544 жыл бұрын
@@aarushsharma9764 correct C# coding
@clement28142 жыл бұрын
Thank you so much. It's fast and efficient as needed.
@operationreddit18043 жыл бұрын
great tutorial, exactly what I was looking for, there is only one problem that i'm facing. its input lag. when I put motorForce to 2000 for example, and when I try to break, there is a lag of about second or 2 before starting to break, and problem is amplified with higher numbers, at 5000 its about 4-5 seconds. does someone have a solution for this?
@hdprodesignteam2313 жыл бұрын
Check this links: Hope helps. kzbin.info/www/bejne/fIfZXpt7l6mEd8U kzbin.info/www/bejne/fZ3EoJyQbZV-mbc Playable Demo : drive.google.com/file/d/1_JnQSfTP8E7EfKZhJVdClohhxBQ7cgei/view?usp=sharing Kindly waiting for your comments to improve it. Thanks.
@FC12CGaming4 жыл бұрын
Omg thanks so much, i'm literally speechless that it actually works!!!!
@idkidc18854 жыл бұрын
Hey man did u try it out on the new version of unity ?if yes does it work on the new version or only one the one he is using
@FC12CGaming4 жыл бұрын
@@idkidc1885 no im using 2019.4
@FC12CGaming4 жыл бұрын
@@idkidc1885 but it should work on the new unity
@idkidc18854 жыл бұрын
@@FC12CGaming ok ty if it doesnot work on the new ill try that version
@FC12CGaming4 жыл бұрын
@@idkidc1885 k
@Nexus-fi1hb4 жыл бұрын
The wheel colliders of my car just detatch and fly into the air and pressing wasd doesen't change anything, pls help
@m0ch1_64 жыл бұрын
Hey Nexus, to fix your problem you should ensure that wheel collider and wheel mesh are not on the same game object or child
@Nexus-fi1hb4 жыл бұрын
@@m0ch1_6 thx, I've already fixed that problem, but now I can't get my car to get faster, no matter what motor force I set. It just keeps driving at the same speed.
@AugGust4 жыл бұрын
@@Nexus-fi1hb U mean for acceleration? If turn the camera to the side u can see in the sample project, the tyres do not have enough grip and the tyres just slip
@lukascampbell58814 жыл бұрын
@@AugGust hey, do you know what i should do if only my front two wheels are rotating? (& turning)
@AugGust4 жыл бұрын
@@lukascampbell5881 The setup for the front and back wheels should be identical? Just go through and make sure you didn't miss anything
@Theferrariguy4 жыл бұрын
Whenever I play the game, The car's motor and brake force change to different setting sand the car goes really slowly please help
@harshvardhanmisal22554 жыл бұрын
Change it in inspector window click on object which has script and then change the values
@Croccolucho4 жыл бұрын
Got the same problem, idk what to do
@Theferrariguy4 жыл бұрын
@@Croccolucho I ended up using vehicle physics pro asset it's very useful I'd recommend it
@mythicaldriftz33573 жыл бұрын
Are you some sort of wizard man i have so much respect for you dude i have tried this and it works yes so to anyone wanna try just do it as he says
@blissweb3 жыл бұрын
I came here to see how to fix the purple car syndrome and you did that in the first minute. :-) Yay.
@Twiney_2 жыл бұрын
This is my first time coding and it works great thanks dude!
@0kr4m2 жыл бұрын
great tutorial! one question: is there a way to give a boost in speed? I can't even change speed values.
@bloggerblogger24102 жыл бұрын
yea i've the same question i need the car to accelerate quicker and go faster and changing the speed/motorForce didn't help at all .
@edmashokmusic1692 Жыл бұрын
For all those looking for car not moving after applying brakes. read the video description
@drewvananne17963 жыл бұрын
Exactly what I was looking for, great tutorial!
@monkeyrobotsinc.98753 жыл бұрын
really cool that this worked, thanks, but i just used cinemachine for the follow camera.
@FelineRaptor-gv4te3 жыл бұрын
yeah, it would be more flexible actually because you can customize the value and get any behaviour you want. Also the cam look script in the video is not very comfortable while steering [same with standard assets cam look].
@DrSwagGaming2 жыл бұрын
@Hawk Game Dev Hey sorry for asking but I am having a problem... When I am clicking the play button. The left side of my car sinks in the ground while other stays normal (like a flat tire for left side). How can i fix? If u know ofcourse
@MoonBro Жыл бұрын
I used this tutorial and physics are working find but for some reason my car just rolls back at 8:13. Oh and for people that are having bouncy wheels and crap reset your transforms on the rotation on your wheels to 0 in blender or with some unity script should solve your problem. (nvm i fixed it just set the motor force to negative)
@nbgtube4682 жыл бұрын
I’m having problems where the wheel colliders start to push away from the vehicle making it float, does anyone know how to fix?
@ImScorpy2 жыл бұрын
Note to people trying to make a Vehicle controller: DO NOT use Time.deltaTime on the motorTorque code
@kimjongun57392 жыл бұрын
Does anyone know why my current break force in the inspector tab stays at 0 (whenever I change it just goes back to 0) when I start playing my game?
@infinit_y7000 Жыл бұрын
The script wouldn't work it tell me "the reference script on this Behaviour (Game Object 'Car' ) is missing"
@rustyrishii3 жыл бұрын
Breaking is not working for me
@SakthivelNadar4 жыл бұрын
This is sooo simple it reminds me physics and maths class not that much i ever attended to maths
@TheCoolcomplex3 жыл бұрын
why are the rear wheels being updated if the parameters of rear wheel colliders never change? from my understanding, the front wheel colliders move according to the torque that is being applied, and the wheel transforms have to be updated to match the wheel collider positions and rotations, but from the code itself, the rear wheel colliders do not move since the torque is only applied to the front wheels in the code, so how do the rearwheel colliders move?
@miguelpereira46452 жыл бұрын
The physics system automatically move them when the car moves because they are rolling in the ground
@erfanroghani2 жыл бұрын
Excellent tutorial, man! Super useful. But for my application, I need to ensure there is no rotation around the X-axis while applying the brake. How should I set the parameters?
@TFG2873 жыл бұрын
Assets\sCRIPTS\CarControol.cs(72,1): error CS1022: Type or namespace definition, or end-of-file expected :I need help
@jvstAsYouAre3 жыл бұрын
I have seen a couple of comments asking how it could be possible for the wheels to be rotated 90 degrees when you start the game but nobody has been able to answer the question. PLEASE HELP!
@maximizer1743 жыл бұрын
yeah, me 2...pls help
@a7medabdalhadi7803 жыл бұрын
I think u made ur own car then imported it into unity I faced this problem also and it is easy to fix, u have to change some details in the script -First go updatesinglewheel method and enter new Quaternion called it "Rightrotation" or any name u want to -next write down this line: Rightrotation=new Quaternion (rot.X, rot.y-1,rot.z,rot.w); //this line should be written after Wheelcollider.getworldpose... etc// -Then change wheeltransform.rotation into: wheeltransform.rotation= Rightrotation; I wish this could help u :)
@browneburbs5377 Жыл бұрын
I have some problematic issues. While I am using a different car model, I don't think it should be any different than what this model provides, but regardless: I've followed the tutorial very well, but I've ran into two problems. When I add a Wheel Collider, it doesn't show up at all during the editing, unless I make a rigidbody component. But once everything was set up and handled, the car either bounces and flies in all sorts of directions that's not wanted, the wheels fall through the plane and into the abyss, or all the wheels snap to position 0, 0, 0. It's very infuriating and I'd love to get this fixed!
@RavishingPimp Жыл бұрын
(If anyone needs it. I did make some differences (Like capital letters on some stuff, but that's all) using System.Collections; using System.Collections.Generic; using UnityEngine; public class CarController : MonoBehaviour { // Rename the terms used in the Unity physics engine private const string HORIZONTAL = "Horizontal"; private const string VERTICAL= "Vertical"; private float HorizonalInput; private float VerticalInput; private float currentbreakForce; private float steerAngle; // Choose whether to break or not private bool IsBreaking; [SerializeField] private float motorForce; [SerializeField] private float breakForce; [SerializeField] private float maxSteerAngle; // SerializeField is because we don't want other scripts to access it, but we do in the inspector [SerializeField] private WheelCollider FrontLeftWheelCollider; [SerializeField] private WheelCollider FrontRightWheelCollider; [SerializeField] private WheelCollider RearLeftWheelCollider; [SerializeField] private WheelCollider RearRightWheelCollider; [SerializeField] private Transform RearRightWheelTransform; [SerializeField] private Transform RearLeftWheelTransform; [SerializeField] private Transform FrontRightWheelTransform; [SerializeField] private Transform FrontLeftWheelTransform; // We use "FixedUpdate" because we need to use the Unity physics engine private void FixedUpdate() { GetInput(); HandleMotor(); HandleSteering(); UpdateWheel(); } private void GetInput() { HorizonalInput = Input.GetAxis(HORIZONTAL); VerticalInput = Input.GetAxis(VERTICAL); IsBreaking = Input.GetKey(KeyCode.Space); } private void HandleMotor() { FrontLeftWheelCollider.motorTorque = VerticalInput * motorForce; FrontRightWheelCollider.motorTorque = VerticalInput * motorForce; currentbreakForce = IsBreaking ? breakForce : 0f; if (IsBreaking) { ApplyBreaking(); } } private void ApplyBreaking() { FrontRightWheelCollider.brakeTorque = currentbreakForce; FrontLeftWheelCollider.brakeTorque = currentbreakForce; RearRightWheelCollider.brakeTorque = currentbreakForce; RearLeftWheelCollider.brakeTorque = currentbreakForce; } private void HandleSteering() { steerAngle = maxSteerAngle * HorizonalInput; FrontLeftWheelCollider.steerAngle = steerAngle; FrontRightWheelCollider.steerAngle = steerAngle; } private void UpdateWheel() { UpdateSingleWheel(FrontLeftWheelCollider, FrontLeftWheelTransform); UpdateSingleWheel(FrontRightWheelCollider, FrontRightWheelTransform); UpdateSingleWheel(RearRightWheelCollider, RearRightWheelTransform); UpdateSingleWheel(RearLeftWheelCollider, RearLeftWheelTransform); } private void UpdateSingleWheel(WheelCollider WheelCollider, Transform wheelTransform) { Vector3 pos; Quaternion rot; WheelCollider.GetWorldPose(out pos, out rot); wheelTransform.rotation = rot; wheelTransform.position = pos; } }
@HideOnDark2 жыл бұрын
Thank you. That's great but wheels spin when the car is stationary and when you go fast, the wheels rotate
@thelife88364 жыл бұрын
The best tutorial. Is single wheel update method essential?
@dwinkley4 жыл бұрын
He stole the code from kzbin.info/www/bejne/oGfChICajMp6fKs
@walney20084 жыл бұрын
I put the wheel configurations as in the video, but even putting a mass of 50000 the car will still be lifting, what can it be?
@leonamferreira80533 жыл бұрын
try changing the suspension spring to 90000 and damper to 9000 on the wheel collider. Remember to change it for every wheel collider on each wheel.
@virxest2 жыл бұрын
Even these tutorials are one big headache. When I finally get to the "Asset Store" and downloaded this package, I press "Open in Unity" and nothing happens. I already need a tutorial for this tutorial. I could only download but how do I "Import"?
@ZAYMANGAMESTUDIO2 жыл бұрын
Hi, my issue is that I don’t want to use only pc to brake the car, but also my joystick
@megozcreed51964 жыл бұрын
if I want the car to apply brakes as soon as I release any of the W S or Up Down buttons , what should I do
@Randomiz8orinator4 жыл бұрын
try reading the input.GetKeyUp method
@megozcreed51964 жыл бұрын
@@Randomiz8orinator well i knew about them , I was meaning how to stop the car momentum , what code to put in the get key up func. I tried motor torque =0 Brake torque = Mathf.infinity But it still didn't stop as soon as key up So had to play with the rigidbody velocity for it to work.
@thaddeusnoffsinger24103 жыл бұрын
Did you figure this out? Having the same question.
@halivudestevez22 жыл бұрын
Seems to be perfect, must try it. (I am lazy, so I will write a code that recognizes wheel colliders, and assign them to an array)
@bithigh83012 жыл бұрын
It works pretty good. Thank you!
@RobertGatesC4 жыл бұрын
Dude, you are a lifesaver. Thank you, brother. I was looking for a vid that would go step by step through the process, and if people want to check the coding under the hood so to speak, you have that too. For someone that doesn't know coding, and wants to put out a game, this is amazing info. And how you did it step by step. Love it. Would you also be able to make a vid of how to easily train any AI car to run a track, and with other AI cars? If so, that would be amazing. Thanks again, and a big thumbs up from me. :)
@FelineRaptor-gv4te3 жыл бұрын
As for ai cars, you can check out Unity's standard assets. there is something called car ai waypoint.
@eleanordare93503 жыл бұрын
very clear and solved all my problems, thanks so much :-)
@salmansaleem21912 жыл бұрын
bro, the car isn't moving with the arrow and WSAD keys, the wheels turn but the car doesn't move forward or backwards please help thank you
@wingy43873 жыл бұрын
Followed exactly as you did, but sadly my car still seems to spin out so easily when turning, I've played with changing values and have also moved the wheel colliders slightly, which helped a bit but it still can't handle driving around a track at speed, what can I do to make it better?
@hdprodesignteam2313 жыл бұрын
Hey Wingy, Here some links for the HD Car Controller V 3.5. kzbin.info/www/bejne/fIfZXpt7l6mEd8U kzbin.info/www/bejne/fZ3EoJyQbZV-mbc Playable Demo : drive.google.com/file/d/1_JnQSfTP8E7EfKZhJVdClohhxBQ7cgei/view?usp=sharing Kindly waiting for your comments to improve it. Thanks. Best Regards HD Pro Design Team
@simplygamedeveloper78592 жыл бұрын
Change the value of suspension to 1.
@roostydoo23 жыл бұрын
Will it still work if you don't use lwrp project ?? EDIT: I'm using 3d with extras
@punit11super3 жыл бұрын
Yes it will
@luxxstar3 жыл бұрын
Hello Can anyone help me? If I want to put body into the empty object "Visual", I get a message that I cannot do this in any prefabs
@CHKNSkratch3 жыл бұрын
you're supposed to unpack the prefab completely
@rajdeepdas863 жыл бұрын
Awesome hands-on tutorial. Can you please do a similar tutorial for bicycle?
@trunkmonkey57493 жыл бұрын
I'd just take away a set of wheel colliders and add a bike model. I think it'd be very similar to the car.
@edmashokmusic1692 Жыл бұрын
my car not moving in an inclined plane about 15° also
@victorfiy98442 жыл бұрын
dude everything is nice and all but how do i add lerp to the Turing of wheel from left to right because it just snaps which i don't like so any idea on how to
@Thoonder4 жыл бұрын
im having a problem. if i stop moving after driving a bit. i cannot move at all anymore idk how to fix
@favour54424 жыл бұрын
Check the discription, the solution is there
@gamedev_navneet3 жыл бұрын
I like your discipline while coding.
@HitesH3D3 жыл бұрын
I made the car with a fully functional car controller. it was working fine but when I use the same script and method on the new car mess it's not working. well are rotating but the car is not moving. any solution.
@vinnypantano68582 ай бұрын
IDK why but my turning angle only goes to 1% even though I have the max set to 50
@sebasA2 жыл бұрын
Thanks, how can I do to stop the car slowly while Im not pressing up key with just the friction? Actually the car never stops, just with break.
@iRuR2 жыл бұрын
W is for throttle, S is for brake, Space is for handbrake i think
@Dybala-jv7pg2 жыл бұрын
like What are the basics you need to learn to produce a , or setup it. Also I need to learn how to add soft notes to a .
@FelineRaptor-gv4te3 жыл бұрын
I have a problem with slowing down when not accelerating. The car doesn't do that. I want the car to stop after a while if the car doesn't recieve input while accelerating forward or backward. I tried using the max friction physics material for the plane in the environment, but it doesn't work. Someone please help.
@luanayres94182 жыл бұрын
I'm using a model car from the polygon city pack and I get a error: "Non-convex MeshCollider with non-kinematic Rigidbody is no longer supported since Unity 5". I noticed too that the wheels already have a sphere collider, but i don't know how to adapt it to the script. I'm new to unity, please someone help.
@anonymousa70303 жыл бұрын
THANK YOUU!! it is very simple and helpful
@peterbutterfield11534 жыл бұрын
So the moving / driving is working fine i changed the motor a bit to suite my little game but the breaking just is not working iv tried removing the "isbreaking check" on the line 52 like you said to another person in the comments and i tried what another person said to that reply and neither worked well the original worked kinda where it breaks but then stuck with the break i also tried a few solutions i thought of but non of them worked mainly one that checks if break force is 3000 then check if space is being clicked make the motor torque to the breaking force that is required to stop the car from moving. Any help would be great
@marcosbenedico73044 жыл бұрын
Same problem
@NewEraGamersOP2 жыл бұрын
Any solution you got ?
@guyoguy3 жыл бұрын
uhh when i do it the car glitches out and then only 1 wheel is actually turning what do i do aaaa
@iamakshobhyashukla Жыл бұрын
my car is moving, but, extremely extremely slow, even increasing the MotorForce doesn't work. Any idea why is this happening? Also, can anyone explain how do the arrow keys or WASD keys directly work in this case? It was never specified which key would be used for motion.
@RTZZZZZZXD7 ай бұрын
how can i download and open the project, when i try to open it it shows nothing :(((
@julioaviles8125 Жыл бұрын
what did you press on 5:43 to change only the 2 you needed
@1minutessvideo3 жыл бұрын
i want reset car posetion when car flipped what can i do
@BuoyEngine4 жыл бұрын
Big thank you !! this is so useful video.
@arpitkhatana36754 жыл бұрын
Bro my car is rotating and flying can u help me.
@farruholimov82812 жыл бұрын
WheelCollider's GetWorldPose is messing up WheelTransform's position. It's pushing the wheel away for certain distance. What might cause it?
@elicopter_go_brr4 жыл бұрын
so remember...this tutorial is VERY SIMPLE!
@francek38924 жыл бұрын
Unity doesnt support rigidbody, we need a new tutorial lol
@ripjawsproxy3 жыл бұрын
I did all that he did, and fixed that one bug, but pressing the wasd or arrow keys does nothing. I require assistance on this issue. Also, I'm running 2019.4 version of unity.
@ItsKevin1832 жыл бұрын
How do I speed up the car/make it go fast immediately. (no slow start)
@halivudestevez22 жыл бұрын
I wonder why to wheel models and colliders are separated in every example?
@Agenayt3 жыл бұрын
Your github download doesn't match the code you did in the video??? Downloaded code doesn't work, come on fix
@laetitialeduc9215 Жыл бұрын
Hello i am almost done but i have issues with the begining with the [SerializedField] i had to make a public void SerializedField() To get it selected underneath but still it doent light up the wheel colliders and i work with the 2022 version
@laetitialeduc9215 Жыл бұрын
Just started coding this week by myself i am learning thru differents tutorial and researches on the interner i made the vehicule myself on unity but stil have wheelcolliders on the vehicule
4 жыл бұрын
Thank you for making it simple
@KalebShewangizaw-b7i Жыл бұрын
Please send us the c# code in pdf
@theplaymakerno13 жыл бұрын
The upgrading of the materials did not work for me.
@steveivanka3 жыл бұрын
theres something wrong in the code, my car doesnt move when i press the button. just moving aside by it self. and rear tires disappear
@muhdasyraf99283 жыл бұрын
Hi! I got a problem when using your code... it seems that my car dint stop accelerate after i press forward...any idea to fix it??
@sinanarts2 жыл бұрын
Hi, Can I use the same exact flow for a VR Car simulation.?