I'm Turkish and my purpose of watching you is that there is no Turkish person who makes videos, so I made a car game and I owe it to your free script, thanks man.
Hi! I have a question about the car. When i play the game, my front left and rear left wheels are sticking out a little further than i intended. Is there a potential fix to this?
hi, when i apply the script, my wheels flip by 90 degrees on the z axis and they rotate around the x axis. what do I need to change in order to get it right?
Adjust the friction of the wheels! Your wheels are probably slipping, basically spinning in place, but it's really hard to tell. Reduce forward friction extremum slip to like 0.001 and iterate from there.
I have a little issue with the wheels, they're rotating but not using the centre of the wheel for it. They rotate in a open "circle", I mean, they move from the centre and create their own circumference. Trying to apply the script to truck wheels so they're not "small wheels". Thanks in advance.
Had the same issue, it doesnt have to do with the wheel size, the center point of the wheel is screwed up (from the 3D file), i used my own model (using blender) to create the car, when you export the car wheel, make sure it's on 0,0,0 (xyz) coordinate otherwise it do the ohio wheels
sounds like the mass of the car is too low. if there is no weight to support the force the flipping part will happen. try adding mass to the object in your rigidbody
After Running A game my car flying in air not stop on ground I'm follow your all steps but car not running on ground I'm copy your every step but didn't work please help me
I'm having trouble with the cinemachine when the car is reversing. The camera doesn't go far behind or infront of the car while reversing but rather the car comes really close and occupies the whole screen. Any suggestions please?
thanks for the response but I finished my first game 1 month ago! I ended up not using cinemachine but rather just manipulating the camera's movement instead. : )
I have a problem with the wheel transform when I put it on the wheel the car starts to do back flips and the wheels move away from the car I don't understand I did the whole tutorial correctly but it makes me feel like that🤔🤔
What are the controls for the movement cuz i have been typing WASD and changing valus weight brake and have also readjusted the colliders but still no results i.e. movement
the controls for movement are on the input system using unity. you will have to add the package as said below and also add the using.UnityEngine.InputSystem for it to work on the horizontal and vertical axes. you can see the buttons in the project settings under input.
its work but i got one problem, the movement is slow, like heavy, i put motor force, break force and macx steer angle like in the video but still slow, anyone can help?
even with the car's mass being 1300, it still flies upward and eventually falls down. I tried raising it A LOT and a little, but it only slows the rising of the car. Not sure what I've done wrong but I did exactly what you did and used the same car model...
when i use premade prefab from asset store script(and other similar scripts) works as it should, but when i make my own car using basic geometry in unity, wheels transform and car flies into space. Or when i use car asset and wheels from different asset all the wheels become right wheels. Where am i wrong????
@@goforit738 i found solution, if your wheel is bugged, use negative scale, like if you have 3.3.3 scale use -3 -3 -3. Unity is not suitable for transform manipulations so better use other 3d modelling apps and import to unity
Amigo eres la respuesta a todas mis preguntas lo intente y no me salio espero que con tu técnica si a y no se si tienes un video el el cual utilizas un personaje y que desde afuera puedas entrar al coche y manejar lo digo si aun no lo haces estaría bien que lo hagas bro gracias
First i need to congratulate you Thanks a lot Can u please help me how can i use my mouse movement for left and right Also can u please tell me how can i display the speed of the car
@@SigmaLigmaChannel one more thing my car is rotating after hitting the plane. I mean: I press play mode, then my car go down when hit the plane it started rotating, i think its because of colliders maybe. could you help me, please
i got 3 errors the namespace '' already contains a ddefinition for 'carController' Type 'CarController' alreaddy defines a member called 'FixeddUpdate' with the same parameter types Type 'CarController' alreaddy defines a member called 'GetInput' with the same parameter types
dude give me script i will copy paste
dude watch video i will help
i@@SigmaLigmaChannel i already watch your video many to see script but u didnt showed whole script thats why
Are you deaf?@@UnlimitedUnity
@PrismUnityTutorials what your mean bro. can u just paste script here pls
Have you watched the video with sound on and are you able to hear properly?
I'm Turkish and my purpose of watching you is that there is no Turkish person who makes videos, so I made a car game and I owe it to your free script, thanks man.
That's great to hear!
Berkaprod da bir sürü video var
oo kral naber
YOU ARE THE EMBODIMENT OF A GIGACHAD THANK YOU MY MAN
my car shaking too much i have tried everything but nothing working pls tell me hoe to make car more stable
🫨
increase dampening on suspension and suspension travel and just general suspenison settings
Hi! I have a question about the car. When i play the game, my front left and rear left wheels are sticking out a little further than i intended. Is there a potential fix to this?
i also have the same problem idk either
Bro, you helped me a lot, I was already freaking out why the code I was using was giving me problems but I found this video, another subscriber
Sigma's United! 🗣️🗣️🔥🔥🔥‼️
Please ask me questions if you are stuck
How can I input the follow offset it won't let me
I want to make the car drift at the press of a button but everything I tried looks unrealistic or the car looks like slipping not drifting.
My car still flies away but slowly
@@slimebonebg mine too
I can’t find the cinema thing
nice video, mate. I was able to get it to work nicely. How would I go about having the camera free look whilst using the car?
how do i improve my starting speed? I cranked the motor force to like 999999 but it still takes forever to build up momentum.
I would add an impulse force during the first frame that the button is pressed, along with the normal car force
@@realkhushmehta How do you do that?
@@mcshootems alternatively, you could also multiply with mass
what is your drag on the rigidbody of the car? for me i had the same problem because it was at 5. if i put 0.1 then it works nicely
me too bruh this car controller sucks
hi, when i apply the script, my wheels flip by 90 degrees on the z axis and they rotate around the x axis. what do I need to change in order to get it right?
Same problem bro
Same with me...
Try with the car provided by Unity asset store, linked under this video
You ever get a fix?
Thank you so much for the camera tutorial part!
This really helped me! One issue though, the rear wheels are very far away from the car, any tips?
my car is stuck on one place but wheels are working
increase wheel collision friction
please make complete course of 3 to 4 hours on this where you teach from importing assets to build complete car game or any transport game
I have a problem, why when I play the car flies?
Assign the Mass of the Rigidbody or the Gravity of the project, make sure that the Collider is not inside the ground when you press Play
car movement too slow. I tried increasing the acceleration (motor speed) up to 1 million but car still too slow. Need help
try lowering the drag of rigidbody of the car
Adjust the friction of the wheels! Your wheels are probably slipping, basically spinning in place, but it's really hard to tell. Reduce forward friction extremum slip to like 0.001 and iterate from there.
I have a little issue with the wheels, they're rotating but not using the centre of the wheel for it. They rotate in a open "circle", I mean, they move from the centre and create their own circumference. Trying to apply the script to truck wheels so they're not "small wheels". Thanks in advance.
Had the same issue, it doesnt have to do with the wheel size, the center point of the wheel is screwed up (from the 3D file), i used my own model (using blender) to create the car, when you export the car wheel, make sure it's on 0,0,0 (xyz) coordinate otherwise it do the ohio wheels
@@Not_Aran8276 ohio wheels 💀
when i made my wheels i had to rotate 90 on the z. Your script flattens them and if i put them under parents then they end up squished.
when the car hits ground it goes to sky by no reason, btw i did all instructions
How the car are moving if we haven't write a code for key press to left right or forward
The video is fake😅
@sigmaligmachannel are you kidding
hi I have a problem. my cars wheels are turn 90 degree when I start the game
and there is no info about this. can u help
answers.unity.com/questions/1357259/how-do-i-get-my-wheel-mesh-to-rotate-on-the-proper.html
Hope this helps
👍
@@SigmaLigmaChannel ty
Awesome, thanks alot sir
My car doesn't move, what should I do?
I changed the spring and damper to the same values in all wheel colliders, but my car still flips over really easily.
me too
sounds like the mass of the car is too low. if there is no weight to support the force the flipping part will happen. try adding mass to the object in your rigidbody
same
exception
The issue is the UpdateWheels function. Im not sure what it is for though, I wish they explained it in the video.
my wheels get flung off
The variable frontLeftCollider of PrometeoCarController has not been assigned
the wheels detached from the car and evryone of them goes on their own, please help
After Running A game my car flying in air not stop on ground I'm follow your all steps but car not running on ground I'm copy your every step but didn't work please help me
added rigidbody mass?
in rigitbody put is kinematic
i don't get the thing under the script, where I can change the variables
same
when i go to start my game my car just flips over and the rear wheels wont move
Awesome, thank you!😀
So the wheels decide to move to the middle of the underbody and the spoiler falls of any fix?
DOUBT : If I have two cars how can i switch and play between them 😢😢
I'm having trouble with the cinemachine when the car is reversing. The camera doesn't go far behind or infront of the car while reversing but rather the car comes really close and occupies the whole screen. Any suggestions please?
you can click on virtual camera and then in inspector click on body and set all damping to zero i think it should help
thanks for the response but I finished my first game 1 month ago! I ended up not using cinemachine but rather just manipulating the camera's movement instead. : )
I have a problem with the wheel transform when I put it on the wheel the car starts to do back flips and the wheels move away from the car I don't understand I did the whole tutorial correctly but it makes me feel like that🤔🤔
What are the controls for the movement cuz i have been typing WASD and changing valus weight brake and have also readjusted the colliders but still no results i.e. movement
The tutorial doesn't mention it, but you need to install the new unity input system package under Unity Registry
@@richbuilds_com Can you explain more plz?
@@webdev_03 ua-cam.com/video/Yjee_e4fICc/v-deo.html
the controls for movement are on the input system using unity. you will have to add the package as said below and also add the using.UnityEngine.InputSystem for it to work on the horizontal and vertical axes. you can see the buttons in the project settings under input.
It's great, thank you very much for this video
No.
Hey! I have a very annoying problem. when I add the wheel collider, it is not visible at all. How can I fix this
Make sure any of the parents has a rigid body. If its still not showing try clicking on the car Prefab wheel collider must be shown there.
i got same issue, just add a RigidBody component to Empty Object
Ok
how do you convert the motor force in real life horsepower ?
I got my vehicle to work but i would like to have sound..i have no patience for coding which upsets me 😥
its work but i got one problem, the movement is slow, like heavy, i put motor force, break force and macx steer angle like in the video but still slow, anyone can help?
I recommend you change up the value of the variables. Let me know if it helps
thank you so so much , bro your video was so helpful but I am not able to see Cinemachine option on top after installing its package.
my car isn't moving, can u help me?
No
can you help me my car is very slow . i tryed everything but this not work
how do i fix the camera jitter
it wont let me drive and rolls backwards until it falls pls help
even with the car's mass being 1300, it still flies upward and eventually falls down. I tried raising it A LOT and a little, but it only slows the rising of the car. Not sure what I've done wrong but I did exactly what you did and used the same car model...
its also when I begin to move forward, it just flies up into the air slowly
Thank you! I'll subscribe
WHY THE WHEEL COLLIDER IS ALWAYS IN THE WRONG DIRECTION, I CANT EVEN TURN IT IN THE RIGHT ONE
i have problem this car is very good but very slow new script? or something in new in unity and this is very hard for me
i can’t change my wheel collider
I am having a problem that the car is falling down
My wheels dont even move and the top of my car just fully comes of as soon as I press start. Any help?
same problem
Yeah same...
Why the tyre are moving but not car
What's "tyre" 🤔
yeah i dont have a model of a car and i cant get one so i made one in unity but everything is broken i wanna make forza horizon 5
Good Luck fellow Sigma
I cant turn left or right or slow down my car help
plz man tell me bro how can i just make a ui button witch rotate my car backward and forward
If you for some reason dont want to click in the bio for the code here is it:
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CarController : MonoBehaviour
{
private float horizontalInput, verticalInput;
private float currentSteerAngle, currentbreakForce;
private bool isBreaking;
// Settings
[SerializeField] private float motorForce, breakForce, maxSteerAngle;
// Wheel Colliders
[SerializeField] private WheelCollider frontLeftWheelCollider, frontRightWheelCollider;
[SerializeField] private WheelCollider rearLeftWheelCollider, rearRightWheelCollider;
// Wheels
[SerializeField] private Transform frontLeftWheelTransform, frontRightWheelTransform;
[SerializeField] private Transform rearLeftWheelTransform, rearRightWheelTransform;
private void FixedUpdate() {
GetInput();
HandleMotor();
HandleSteering();
UpdateWheels();
}
private void GetInput() {
// Steering Input
horizontalInput = Input.GetAxis("Horizontal");
// Acceleration Input
verticalInput = Input.GetAxis("Vertical");
// Breaking Input
isBreaking = Input.GetKey(KeyCode.Space);
}
private void HandleMotor() {
frontLeftWheelCollider.motorTorque = verticalInput * motorForce;
frontRightWheelCollider.motorTorque = verticalInput * motorForce;
currentbreakForce = isBreaking ? breakForce : 0f;
ApplyBreaking();
}
private void ApplyBreaking() {
frontRightWheelCollider.brakeTorque = currentbreakForce;
frontLeftWheelCollider.brakeTorque = currentbreakForce;
rearLeftWheelCollider.brakeTorque = currentbreakForce;
rearRightWheelCollider.brakeTorque = currentbreakForce;
}
private void HandleSteering() {
currentSteerAngle = maxSteerAngle * horizontalInput;
frontLeftWheelCollider.steerAngle = currentSteerAngle;
frontRightWheelCollider.steerAngle = currentSteerAngle;
}
private void UpdateWheels() {
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;
}
}
great video and help with setting up colliders, can this script be adjusted for mobile environment? taps on the screen?
ua-cam.com/video/tmZ3VTjwfC8/v-deo.html
Impossible
obrigado cara graças a ti criei meu primeiro jogo
mine the wheels arent moving
but the car is'
can you tell me how to import that car to the sample scene
oh nevermind
Vehicles slide sideways when going on on slopes. any fixes?
increase friction on wheel collisions
How do i fix it if the wheels are sideways?
when i use premade prefab from asset store script(and other similar scripts) works as it should, but when i make my own car using basic geometry in unity, wheels transform and car flies into space. Or when i use car asset and wheels from different asset all the wheels become right wheels. Where am i wrong????
Yeah same idk whats happening
@@goforit738 i found solution, if your wheel is bugged, use negative scale, like if you have 3.3.3 scale use -3 -3 -3. Unity is not suitable for transform manipulations so better use other 3d modelling apps and import to unity
have you frozen your 3d model transformations?
Amigo eres la respuesta a todas mis preguntas lo intente y no me salio espero que con tu técnica si a y no se si tienes un video el el cual utilizas un personaje y que desde afuera puedas entrar al coche y manejar lo digo si aun no lo haces estaría bien que lo hagas bro gracias
Why can wheels turn and spin when we have four separate wheel meshes and how
you find a solution?
My car starts shaking when i drive do you know how to solve it?
change the spring and damper rates to lower numbers or higher depending on weight and also slight increase the suspension distance
My cinemachine camera shakes heavilty.
i tried the damping to set to 0 in the aim tab but nothing.
🫨
Adjust the horizontal damping to 0.1 instead of 0, and you'll thank me later. :)
hey my car isnt braking well and takes ages to brake how do i fix this???
Apply pressure to brake🙃
First i need to congratulate you
Thanks a lot
Can u please help me how can i use my mouse movement for left and right
Also can u please tell me how can i display the speed of the car
1:12 the gizmos from my wheel collider does not work
my car is extremely easy to flip over, all my settings are the same as yours and i dont want to freeze the rotation. is there a fix to this please?
have your wheel colliders further out from the center of mass
Fbx support??
my car shakes a lot when i am trying to turn any reasons why?
🫨🫨🫨
Sir while I play my car automatically lift upward
Please tell any solution
@@Sigmashinchan_1342 added rigidbody mass?
Box collider 2d?
I jst wanted to say thanks man
idont get the script to work
this video: about how to script a car in unity
me: BumBLBEEE YAYYYY!!!!! 😃😃😃 🤖
my car flips every time I hit the play game mode , Idk whats happening can anyone guide
Have you watched the part where I covered that issue?
how do i make the floor like that?
special texture added to cube
i want to make car drift like nfs , dirt 3. could make video?
car vibrates and becomes blurry while driving.
Have U considered glasses? 😃
I fixed it by increasing the horizontal damping by 0.1 😏
Can it support mobile controls?
Yes! I've got a video on that
Great vid super easy to follow thank you
Are you now a sigma-scriber? 😂😂😂😂😂😂😂😂😂😂😂
do u still answer question a year later?
No
lmao@@SigmaLigmaChannel
man, how to make infinity road like yours?
Add a plane to your scene and scale it up. Then you add a texture to it 👍
@@SigmaLigmaChannel i will try thanks
@@SigmaLigmaChannel one more thing my car is rotating after hitting the plane.
I mean: I press play mode, then my car go down when hit the plane it started rotating, i think its because of colliders maybe. could you help me, please
help my wheels wont stop flying away
my car is mooving very very slow, it's hardly belive that it's moving
increase wheel collision friction
where is the script
The car just starts flying :/ can someone help?
increase mass of car
Can you plz make video on mobile controller of this script?? Plz🙏🙏🙏🙏
Thank you for your suggestion. Yes, there will be a tutorial on a mobile car controller in the next couple of weeks or so. Great idea!
@@SigmaLigmaChannel Oh nice! Upload tutorial as soon as possible :) Edit :- I need it too :D
@@MutantBrooo4321 Probably will be at the end of next week, because I’m already working on another video and don’t have a lot of time currently
bro pls reply i cant drive the car
Mmh
this is convenient if you dont know how to code!
Thanks Bro!
my car wheel drive sideway idk why but its side way
pls help
Make it drive foreward 😁👍
thank you for your help *sarcasm*@@SigmaLigmaChannel
@@taraskhan475 np
lmao, but yeah I did find this tutorial helpful @@SigmaLigmaChannel 👍
i got 3 errors
the namespace '' already contains a ddefinition for 'carController'
Type 'CarController' alreaddy defines a member called 'FixeddUpdate' with the same parameter types
Type 'CarController' alreaddy defines a member called 'GetInput' with the same parameter types
There are probably 2 scripts called carcontroller
I think you should learn the basics of unity first before making this
Why wheel cooliders is not visible to me
Put on your glasses 😁👍
@@SigmaLigmaChannel ☠
My car is fliying wegen I play