"Welcome, no wasting time. Let's go." 👌
this shit was actually funny and helpful, i love these types of tutorials when the guy gets straight to the point , doesn't have cloud9 in the background and 144p quality, great job
Good tutorial, one problem I had with it was the inconsistencies and lack of explanation to certain things at times, like lines of code that go unexplained or changing names of variables and such. other than that, great tutorial!
Thanks for the framework idea, I'll definitely think about scripting my own version of this sometime in the future. It's a bit disappointing how commissions requesting this type of asset are usually low-paying and quickly stolen, though. Ever since vehicles became in-demand, non-con reselling skyrocketed.
I fell in love with your vroom racing
I love your driving system ITS SO GOOD ITS WAY BETTER THAN ANY OTHER ROBLOX GAME I PLAYED!!!!!!!!!!!!!!!!!
I made a post on reddit once about how every roblox driving game is more or less ass but yours is just what I was looking for!
Thnak you for this!
NOW THIS IS THE PERFECT CAR SUSPENSION
Literally the most straightforward video ever made. You sir, deserve to be the leading CZcams roblox developer right now.
Dude, this is such a hidden gem. I haven't found any nice explanations on how this works, and you only have 600 likes? Very nice job, keep working hard :)
It's actually sad how much more I learned from this one single video on Raycast vehicles than I have in the past 7 years from Unity tutorials (since there are so very few)
I've applied your principles to a Raycast car in Unity and it works as well, amazing (suspension I already had working, it was just the friction stuff I never got right)
Could you perhaps in a future video expand on how to make it more realistic in where you can drift with the car and such?
and i've actually made it originally from this Unity tutorial czcams.com/video/x0LUiE0dxP0/video.html into unity and then translated to roblox
@@Krokosha666 That's my tutorial xD (look at my name ^^ this is my alt account)
Awesome you're using that tho!
But unfortunately I never got to figure out how proper friction works for both grip and drifting so I was hoping to see that since you seem to have that figured out c:
@@blinkachu5275 lol didnt notice ur name was the same, i made friction lower relative to side velocity + how much force was wasted on forward velocity
@@Krokosha666 Could you perhaps write that in pseudo code? I don't really understand what you mean with that ;-; sorry
I can get the side velocity (rigidbody.GetPointVelocity(hit.point).x) and can get it in localspace too, so that's no problem but how would you lower the "friction relative to that" and what do you mean with "force wasted on forward velocity"
I am really sorry for bugging about this, it's been something that I've been stuck on forever and I really just need that one "aha" moment as it were
@@blinkachu5275 sorry for late reply, so as i look at friction system i made, i dont really understand what exactly i tried to do there, it just works, it outputs number from 0 to 1 and then that is somehow multiplied to x and z separately
XwheelEffi = math.min(1,WheelFriction/(math.abs(vel.x)*200))
then theres engine/brake force combined with floor and wheel friction
fWeffi = (XwEffi + (Zforce~=0 and math.min((WheelFriction)/math.abs(Zforce/5+vel.z),1) or 1)) / 2
fWeffi is final
Here i am again, months later i croticised your og video for promoting copy paste spoonfeeding without any explanation this is actually pretty well made,
+ good code
i just rralized you featured me in the video at the end 🙏
Been waiting a while now for this lol
Thanks dude! Used the dampening logic to get mine working.
Дождались! Не зря ждал
Can you make a video explaining about the car entry animation? , I was surprised how something so cool can be ignored in Roblox car games.
Thanks dad now i can make car and go finally pick up my kids after 10 years at school.
I hope they still love me.
I love your subtitles! 😂
I didn't understand a single god damn thing you just said but I enjoyed every minute
Are you going to make a tutorial for your version of door animation? looks very clean
thanks this is so helpful
you have a beautiful voice 😉
anyway and idea for next video is a regen button,
and maybe about the lights make it so when you brake the tail lights turns on?
for those lights you can take Z from local velocity(in raycast loop), and now if car going forward but throttle is backward activate taillights
that position that you said in the start is called Object position and instead of doing this you can use attachments it gives the Object Position and the world position
Quick Question: How did you add the drifting stuff that you showed at the end of the video?
Hey wanted to let you know, there's an issue with driving on water. I was thinking is it possible to filter the terrain water in the "FilterDecendantsInstances" parameter?
Awesome vid dude! I learned the fundamentals from this video and wrote my own code using them, but I can't figure out how the wheel friction works. Would you mind explaining to me what is going on in lines 67 and 68?
sry i wrote it too detailed
Xforce takes local velocity on (velocity relative to wheel base rotation(car orientation inclucing steering angle)) and reverses it so that the force will push in opposite direction from current velocity to stop the velocity on X(left and right movement relative to the car) and velocity is multiplied by wheel friction variable because vehicle mass will ignore most of energy and then it is multiplied to rightVector which is just vehicle relative right position and Xforce becomes force impulse that will add sense that wheels spin forward
Zforce is just engine force multiplied by curent throttle multiplied by what looks like Max speed limiter for reverse and then just muliplied by forward of wheel which will push car forward
@@Krokosha666 Ahhh Ok that def clears up the side to side friction, do you know how to apply a wheel friction whenever the car is moving so that it will gradually come to a stop when the gas isn't being pressed? I've tried using the same variables you created for side to side friction, but I had no luck with that.
@@Krokosha666 Or I suppose a better question would be how does line 68 work, rather than just what does it do?
My suspensions just shake violently very slightly. Like tiny movements really fast and it’s annoying to look at
Loved it but also had to watch it three time lmao
I don't understand what I'm doing wrong.. I'm following along with the tutorial but my car wont stay still? It just keeps bouncing up and down till it goes out of control and flips upside down. Please if anyone can help.
hey there, I have a small issue with the car. Basically every time the car turns gravity pushes on one side and the car doesnt go back to driving straight which makes it very hard to drive on straight roads or in general. Do you know how I could fix that?
don’t know if you still reply on this video but i might as well ask, how could i make it so that i can have multiple cars and also possibly how i can add module scripts to control stats and position of wheels, cause i’ve tried doing it but every time i try it just breaks but doesn’t print any errors
Hopefully we can get a video cover slip/friction. Thank you!
my brain explode with that machine gun speed explanation but i got it 👍
+1 sub
you deserve a like tbh
Meraviglioso!
super informative
well my car now goes crazy fast into backwards i think when i drive forward (and flies uncontrollably)
do you think you could make a tutorial on the tire trails and tire smoke?
Gained a sub awesome video
Nice video, but can you make a tutorial on how to make owner only car seat for a chassi so when player 1 seats in the seat it remembers him but when player 2 tries to drive the car it kicks him from the driver seat.
underrated
I like this a lot, and forgive me if this is a dumb question, but when I change the wheel positions so that they aren't polar opposites, the car begins to tilt forward and drive in that direction without me moving. Is there any way to get around this?
Not dumb question but difficult to do, i didn't move wheel positions like this but i think u have to somehow calculate mass each wheel is lifting by its offset
or easier not 100% sure is to move mass center in center of all wheels,
hmm does the jeep model from roblox, the one seater thats white with no roof, does that model jeep use raycast?
question: are u already added full script (eg. car features)
how my brain is just suddenly blank how you are so good at scripting I literally feel so jealous at you because you are so good at scripting. :(
I came across this video while looking for a good car system and the end product of this video is really great but for me as a non scripter it is extremely difficult to add for example a 2 car model or as mentioned at the end of the video this smoke effect at low friction is there possibly a video where it is better explained or is a version 3 of this system in planning?
I don't think he would make version 3 since the event video. But we can't change time so yea
you dont need any scripting skill to change the car's body, just weld it with the main part
How would I go about keeping the wheels from going underground? I have everything set to be the right stiffness correct dampener and even double my wheel radius yet the wheels still end up going through the ground
i'll take apart your code and use it for my system...thanks :)
yea im sorry my brain falls apart every time somebody tries to explain a math equation
The part ends up floating, Is it because BodyVelocity got depreciated?
Out of full curiosity, how’s the benchmark performance like when placed against ROBLOX’a constraint chassis and A-Chassis 6.81/6.52?
I’m subscribing just because of the fact that this is extraordinary
amusing question, i was not testing it before because i was confident that this is better, now after some lil testing, short answer: it is better. this car system is much better with RAM usage and slight(maybe not) CPU usage improvement. i'll even test this stuff on low-end computers later for bigger difference
edit: no vid about it
@@Krokosha666 I assumed so, was slightly skeptic because of the fact that you had quite a sum of constant loops you have in, so was really curious about how it’ll compare against A-chassis which is a constant never ending loop
@@JasonCOBA loops are forever and are in system scripts that will care about every car,not only one like a chasis does(which reduces RAM usage), mine is just without complex engine and transmission simulation, only thing to worry about is that wheels are not cylinders and not physical objects (it adds immunity to physics glitches throwing normal constrain cylinders too far/stuck behind walls)
7:31 / 9:10
Is any of your version available on toolBox? if yes, thype it name pls.
EDIT: i checked the description, and i UNDERSTAND it,so i can CTRL+C :D :D
Nice video! But i feel like this flying brick needs some gears to make it more realistic. I like using manual transmission cars on roblox.
the realistic transmission for this is thing that i still did not manage to make properly
Helicopters next lol
random skips in the video are kind of confusing and constant changing of variables are hard to follow
im having a problem, like when i move the car with the roblex moving tool, when i stop moving it, the force is so big that it goes flying, and idk what i did wrong, i simply wrote stuff like you did
if car is ok without moving it with tool, its ok, it is happening because of applyImpulse pile up when part is anchored while moving it, so just pit check before suspensions that if car is not anchored
is it only me but only my left wheels are rotating when driving?
прикольно
Epic tutorial.
Question what if you tried making a jailbreak chassis...?
Can you do it with more explanation please! I've been trying for so long to do that, but there's a lake of explanation!
Love this video so much omg
I'm not sure why but my car works perfectly except that it shakes uncontrollably and slowly moves on its own
Ima look further into it tomorrow, maybe I messed up a calculation
yes, these are some side effects that evil author of tutorial did, like it slides down on angled place and applyimpulse is not right thing to use
@@Krokosha666 Any tips or things you could recommend to look up on how to fix/replace these side effects of the evil author?
how do i switch bodies from the uaz to something else
why are you using a while loop when you can be using either Heartbeat or RenderStepped; have you not read docs on task scheduler?
how you making players to spawn in a car. on vroom racing
Hey how do u make gear changing system like on vroom racing
Edit : I mean the sound, yea sound
Edit : CZcams's comment is pranking me
how did you make sounds in car?
The tutorial was difficult to understand can I get Roblox model with code car and the whole pack I subbed
for the wheel rotations, when i turn, it turns every wheel in the vehicle folder... any help?
i wish i understood this rocket science
Good tutorial but I’m having trouble with the CFrames
instead of cloning code to the npc, why not just have the npc send a vector as to which direction they want to go?
yes, i said there stuff about npc mainly for suspension system working on server side, npc will control it howerver u want
what did you use to visualize the raycasts? open source code or custom-made code?
Why is my part so bouncy it teleports off the map. :(
I need more details and explanations, i restarted so many time with no success.
ive been programming for 2 yrs but still dont know how to start with cars lol
wow so good you more good than me cuz i know nothing abt scripting :p
Is it possible to make like a low rider type car? Like hydraulics?
Yes, you can make suspension length for each wheel in table or you can just add value same as wheelRadius but multiple in table only to extend raycasts and change those hydraulics length in separate function, but u may have troubles in replicating it(letting other players know what hydraulics u activated(maybe add numberValues))
This literally does not work on the client due to the code expecting a static deltatime (in which only heartbeat provides, using renderstepped on the client is much better)
If you want your game to run at 30 fps on modern hardware, go for renderstepped.
Can you do planes next?
This system is really nice! But I have a question. How would I make it stop accelerating faster than the max speed when I turn and also be able drive up steeper angles without needing to have to go up to max speed?
Great tutorial tho keep it up! :D
Edit: Nvm, I increased the torque and added acceleration variable so it takes time to speed up. And for turning, I added turn speed cap.
Hey, I have the exact same problem right now. I would really appreciate it, if you could message exactly what you changed in the scripts, that would be very great! If not that's fine, no one can get everything in the world :)
@@user-kt7dv1xb1b i just added a new variable called acceleration and made it fraction like 30/100 then multiplied it inside the ZForce
@@user-kt7dv1xb1b and for turn speed same thing but with x force and also made it so the faster you go, the harder it is to turn. So i just made another variable and made it multiply the speed divided by 25. Thats what i remember doing because i cant check right now but i hope it works!
@@MyNameJeffOG oh alright thanks, I will try to see if I can type it in myself. Just to be sure though, what does torque do in your modified script?
@@user-kt7dv1xb1b its the same as in the video. I didnt change anything for torque except just increase it. I made my car heavier so thats why i increased it
wow where did you learn from scripting? it is hard to learn?
Me: Searching for some Raycasting Tutorials
He: Literally does magic
yuh it's meant to people who already understand some of it, i just spiced it up with some physical formulas that made it look like vehicle
Great video! But when I steer, the car speed goes down, and I can't figure out a solution to keep the same speed at all times. Do you know how to modify the throttle/steer code?
i think it's mostly friction cuz when u steer wheels horizontal side turns slightly against general velocity, i have same thing and it is intended irl too, steer angle and wheel friction settings are ones that are causing it
@@Krokosha666 But if I change the friction value the car will slide away. What I want to archieve is a car with the same friction that keeps its speed when turning.
@@alessiopelizzoni5170 maybe raise acceleration? or somehow figure out that velocity will smartly translate into current rotation idk
Usefullllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll THANKS BRO
jit made something thats even more complicated than slot cars
i have many issues and idk how to fix them plus you missed many spots of the script cant you just put script in desc or cmts? plss
Can you give put the script below here for the car?
This is absolutely an amazing tutorial, very well scripted and explained. One question though, will the model with the advanced and smooth camera be released to the public?
Can i make the car destroyable with this method?
Can u give model of this pickup?
vroom racing top geim nice camera script (:
Question could i use this on vehicles with no doors or does it have to have some doors??
Of course you dont have to, only if u wanna keep door opening function check if car has doors and thats all
The car still spins after adding Xforce and is very shaky when multiple two cars. Can I fix this somehow?
idk what can go wrong there, maybe uncentered mass, or something's wrong with LocalVelocity, and check if it is added to applyImpulse
wanted to learn how to script cars for the past several months, i'm just really bad at math and translating into physics.
well you can first make the basic car, i believe there is roblox official tutorial on how to make it with constraints and physics objects
@@Krokosha666 Roblox's destroying the tutorial with a crappy "documentation" thing
my head hurts
! TRADE OFFER !
i recieve: +1 subscriber
you recieve: literally nothing
great trade
subscribing now
cant pass up a bargain like that, subscribing now.
i cant have nothing. can i have a bag of air. would that be a good trade?
yo i like the trade heres a sub
i SUScribed