makes it so satisfying to drive around hilly terrain. no longer shall our cars get stuck!
@sebtistudio
Жыл бұрын
Fr
@kowugi
Жыл бұрын
That's a genius idea, how didn't anyone come up with this? We need a tutorial, if you have time.
@owoshka2427
Жыл бұрын
There is a tutorial on it...
@Beef_Pie
Жыл бұрын
It's not really a new idea. Games like Jailbreak use it and it's pretty much the standard in other game engines
@kowugi
Жыл бұрын
@@Beef_Pie Oh? I'm sorry I didn't know that.
@Beef_Pie
Жыл бұрын
@@kowugi Nah don't be sorry. I didn't even know what a raycast was 6 months ago lol
@archery8246
Жыл бұрын
@@Beef_Pie I am still not know how to use raycast lol
@checked_cheese
Жыл бұрын
really smooth
@Beef_Pie
Жыл бұрын
Just now realizing that shapecasting was added to roblox. Im gonna experiment with that to try and make this system better
@Octopot-4-Life
Ай бұрын
Question, can you explain how you did this? I don't want the script, I just want to know the basic details on how you did this.
@Beef_Pie
Ай бұрын
@@Octopot-4-Life Ima try to break it down the best I can, but tell me if anything is still confusing The base chassis is consisted of a seat, a big car-sized part, 4 attachments (positioned in the corners of the car, or wherever you want your wheels to be), and 4 vector forces that are the children of those attachments. Basically, it looks like the thing in this video (without the green lines at every corner) kzitem.info/news/bejne/xLCctZaIr5tqmGU You send a raycast to the ground from each attachment, and calculate the distance. Using that, you can use hookes law to get a spring force calculation for every vector force. Just put that calculation in the y vector of the vector force and it should push the car up. If you have no idea where to start with hookes law and calculations and stuff, this video is really good kzitem.info/news/bejne/pJqGv6CgbqeLmH4
@Octopot-4-Life
Ай бұрын
@@Beef_Pie Alr, thanks! :) Suddenly this is way easier than I expected. (Nice car btw. Hopefully I can create something like it.)
@xenom2817
Ай бұрын
@@Beef_Piehow did you get the vector force to not make the car constantly go up? I've been trying to do this exact thing and my car is just either getting flinged up or just starts floating up slowly. I'm assuming there's an equilibrium but I don't know how to obtain it.
@Beef_Pie
Ай бұрын
@@xenom2817 Theres a cou[ple reasons why this might be happening 1. Some part on your car isn't part of the raycast blacklist, so the car is gonna keep springing off of itself (I hope that makes sense) 2. For the vector force, you might be adding the force onto the force from the previous frame instead of just directly setting it (Makes it infinitely rise) 3. When the rays dont hit the ground, make the vector force equal to zero, or else its gonna freeze the force at the last value it was given, and it will speed up exponentially Besides that, there could be some bug in the way you implemented hookes law, and you probably just needa make one of your values negative or something (which yes is annoying as hell) If any of the first three things don't work, lmk and i can probably think of something else that might be causing it. Its 1 a.m. for me rn so my brain is fried lol
@catonut
Жыл бұрын
all of thease people make vids of thrm testing a game when it is not finished to look cool (earned a sub :)
@Beef_Pie
Жыл бұрын
It's okay to show off your progress in something. It helps you stay motivated. Why do you think so many people post their gym progress?
@catonut
Жыл бұрын
k nvm lol :)
@anonim9441
Жыл бұрын
Seems pretty good for a roblox game. I want to see soft body physics in roblox but it would be hard.
@Beef_Pie
Жыл бұрын
There have been a few decent soft bodies made with mesh deformation, but they are generally pretty laggy, which is why nobody does them
@olliedaant8831
Жыл бұрын
Amazing👍👍👍🦍!!
@Smurfis
11 ай бұрын
I can see Suphi smiling
@miotonroblox
Жыл бұрын
bro just did beamng physics💀
@thubieel6361
Жыл бұрын
its jesus christ personal car
@funnimonkibdog
Жыл бұрын
Bro’s getting technical with it
@Beef_Pie
Жыл бұрын
Only about two weeks of struggle and pain to get to this point :)
@funnimonkibdog
Жыл бұрын
@@Beef_Pie Bro’s hustling with it
@MrRobloxIndonesia
Жыл бұрын
WE FINALLY INVENTING FLYING CARS!!
@devinggames
8 ай бұрын
im strugling to reach this result, dude. Some chance of you to sell it so i can study ur methods? i have a channel of roblox programming in portuguese and im trying to realize a way to do that. Already tried some unity/unreal tutorials, but nothing really helped until now. Prob its just me being dumb. If theres a chance of selling it, plz let me know.
@Pawlentine
Жыл бұрын
Man I been struggling making one for months, usually cause when turning a certain direction the speed of the car goes up to 9999, and don’t know how to apply the force in the attachments look direction cause it doesn’t face the same direction as it’s parent
@Beef_Pie
Жыл бұрын
When you say the attachments don't face the same direction as the parent, do you mean that they don't rotate with the parent when it's moving, or that they just have messed up orientations to begin with
@Pawlentine
Жыл бұрын
@@Beef_Pie yeah they don’t rotate when the parent is moving I been trying to apply the acceleration force in the direction of the attachments and they are all inside a part(car) but they only face the x direction or whatever instead of facing the direction of the part(car) so it doesn’t work right when pressing a and d to turn the front attachments 45 degrees or whatever so the car can turn Also attachments are inside a part and used for the raycast suspension and other forces
@interclosure
Жыл бұрын
How did you make that terrain?
@tmaziak2245
7 ай бұрын
Can you make a tutorial on how you did this?
@12Duckz
Жыл бұрын
where them wheels go mann
@MScienceCat2851
8 ай бұрын
This is good suspension, and for stiffness you jjust need to mutliply your car mass by gravitational acceleration, and then divide by amount of wheels, 4 in this case, and then you get force number for each suspensipn, but one problem im struggling is damping, as I dont really understand it, and theres no way to make shock abosrber, any tips?
@Beef_Pie
8 ай бұрын
Your dampening force is pretty much just the product of your wheel velocity and some constant dampening value of your choice (The higher it is, the less bouncy your suspension will be. I like to make mine 1/10 of what my stiffness value is) So, the dampening equation is as simple as (Velocity * Dampening) = DampeningForce Then, you subtract that from your stiffness force, which will allow the springs to slow down and come to a stop Full equation: SuspensionForce = (StiffnessForce) - (DampeningForce) If I didn't explain it well enough, this video is really easy to understand and should help you out kzitem.info/news/bejne/pJqGv6CgbqeLmH4
@MScienceCat2851
8 ай бұрын
@@Beef_Pie Thank you.
@amgiveaway09812
6 ай бұрын
damn einstein
@plat216
8 ай бұрын
all fun and games until you try to drive up stairs, cant treat tires with significant radius as points in space
@Beef_Pie
8 ай бұрын
thats why you use spherecasts instead of raycasts, which were finally added pretty recently
@hakprodz
Жыл бұрын
bro for real, i've been hating ALL roblox racing games since every one of them had the same bullshit suspension and physics, they were so unrealistic and unfun, car gets stuck everywhere and just going through the terrain shown in the video was a torture. but with this system you created, it actually seems enjoyable and realistic, if only this was implemented in most of racing games roblox would have better games related to cars.
@TylerNPTOfficial
Жыл бұрын
Hello there i don't know if you are even gonna read and reply to its but does this ray casting technic can be use for car with multiple wheel like a truck with 6 wheels or even tanks.
@Beef_Pie
Жыл бұрын
Yeah any amount of wheels would work. I basically made it so that there's suspension wherever there's an attachment
@liuredrummer3701
Жыл бұрын
How did you calculate the friction forces?
@plat216
8 ай бұрын
kinetic friction = mu * normal force * (- component of velocity parallel to surface) normal force = mass * gravity * suspensionforce suspension is usually an ideal spring, so suspensionforce = -k * displacement (most suspension also having damping, so include that too) mu and k are determined experimentally irl the negative component of velocity parallel to the surface can be calculated analytically by taking the projection of velocity onto the normalized surface normal vector, and subtracting it from the original velocity vector
@aafnixstriy
Жыл бұрын
have you try the sphere cast?
@Beef_Pie
Жыл бұрын
Working on it rn
@ASleep-er
Жыл бұрын
I only want the music in this video because i'm bored
@player9315
10 ай бұрын
My implementation is extremely unstable idk why
@Beef_Pie
10 ай бұрын
Do you have a dampening force?
@player9315
10 ай бұрын
@@Beef_Pie yea i,ve since fixed it, it was just a problem with the stoopid formula, although using vectorforces makes the suspension weird doesnt act like suspension instead it feels like it just bounces up and down
@YourNormalRedditor
Жыл бұрын
Music?
@Quandalous
5 ай бұрын
Gimme O_O
@imadahmed4510
9 ай бұрын
How many raycasts did you use per wheel?
@Beef_Pie
9 ай бұрын
1 per wheel
@imadahmed4510
9 ай бұрын
@@Beef_Pie Oh, what do the red dots represent? Sorry, still trying to learn raycast. Completely new at it.
@Beef_Pie
9 ай бұрын
@@imadahmed4510 The red dots at the top are where the ray originates from, the ones at the bottom are where the rays hit, and the ones in the middle represent the wheel radius
@JayaJayaJaya21
Жыл бұрын
can you make this for me i will pay
@bielsbd6984
Жыл бұрын
Are you selling it?
@Beef_Pie
Жыл бұрын
probably not
@bielsbd6984
Жыл бұрын
@@Beef_Pie and could you make a tutorial or make it open source?
Пікірлер: 74