Тёмный

Raycast Suspension (Roblox Studio) 

Beef Pie
Подписаться 462
Просмотров 10 тыс.
50% 1

Опубликовано:

 

21 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии    
@nervehammer1
@nervehammer1 Год назад
makes it so satisfying to drive around hilly terrain. no longer shall our cars get stuck!
@sebtistudio
@sebtistudio Год назад
Fr
@kowugi
@kowugi Год назад
That's a genius idea, how didn't anyone come up with this? We need a tutorial, if you have time.
@owoshka2427
@owoshka2427 Год назад
There is a tutorial on it...
@Beef_Pie
@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
@kowugi Год назад
@@Beef_Pie Oh? I'm sorry I didn't know that.
@Beef_Pie
@Beef_Pie Год назад
@@kowugi Nah don't be sorry. I didn't even know what a raycast was 6 months ago lol
@archery8246
@archery8246 Год назад
@@Beef_Pie I am still not know how to use raycast lol
@Beef_Pie
@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
@Octopot-4-Life 4 месяца назад
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
@Beef_Pie 4 месяца назад
@@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) ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-czfObRvi9e0.html 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 ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-CdPYlj5uZeI.html
@Octopot-4-Life
@Octopot-4-Life 4 месяца назад
@@Beef_Pie Alr, thanks! :) Suddenly this is way easier than I expected. (Nice car btw. Hopefully I can create something like it.)
@xenom2817
@xenom2817 4 месяца назад
@@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
@Beef_Pie 4 месяца назад
​@@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
@Smurfis
@Smurfis Год назад
I can see Suphi smiling
@anonim9441
@anonim9441 Год назад
Seems pretty good for a roblox game. I want to see soft body physics in roblox but it would be hard.
@Beef_Pie
@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
@catonut
@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
@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
@catonut Год назад
k nvm lol :)
@miotonroblox
@miotonroblox Год назад
bro just did beamng physics💀
@thubieel6361
@thubieel6361 Год назад
its jesus christ personal car
@hakprodz
@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.
@funnimonkibdog
@funnimonkibdog Год назад
Bro’s getting technical with it
@Beef_Pie
@Beef_Pie Год назад
Only about two weeks of struggle and pain to get to this point :)
@funnimonkibdog
@funnimonkibdog Год назад
@@Beef_Pie Bro’s hustling with it
@checked_cheese
@checked_cheese Год назад
really smooth
@plat216
@plat216 11 месяцев назад
all fun and games until you try to drive up stairs, cant treat tires with significant radius as points in space
@Beef_Pie
@Beef_Pie 11 месяцев назад
thats why you use spherecasts instead of raycasts, which were finally added pretty recently
@interclosure
@interclosure Год назад
How did you make that terrain?
@devinggames
@devinggames 11 месяцев назад
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.
@MrRobloxIndonesia
@MrRobloxIndonesia Год назад
WE FINALLY INVENTING FLYING CARS!!
@12Duckz
@12Duckz Год назад
where them wheels go mann
@player9315
@player9315 Год назад
My implementation is extremely unstable idk why
@Beef_Pie
@Beef_Pie Год назад
Do you have a dampening force?
@player9315
@player9315 Год назад
@@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
@tmaziak2245
@tmaziak2245 10 месяцев назад
Can you make a tutorial on how you did this?
@olliedaant8831
@olliedaant8831 Год назад
Amazing👍👍👍🦍!!
@TylerNPTOfficial
@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
@Beef_Pie Год назад
Yeah any amount of wheels would work. I basically made it so that there's suspension wherever there's an attachment
@MScienceCat2851
@MScienceCat2851 11 месяцев назад
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
@Beef_Pie 11 месяцев назад
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 ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-CdPYlj5uZeI.html
@MScienceCat2851
@MScienceCat2851 11 месяцев назад
@@Beef_Pie Thank you.
@amgiveaway09812
@amgiveaway09812 9 месяцев назад
damn einstein
@liuredrummer3701
@liuredrummer3701 Год назад
How did you calculate the friction forces?
@plat216
@plat216 11 месяцев назад
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
@Pawlentine
@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
@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
@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
@imadahmed4510
@imadahmed4510 Год назад
How many raycasts did you use per wheel?
@Beef_Pie
@Beef_Pie Год назад
1 per wheel
@imadahmed4510
@imadahmed4510 Год назад
@@Beef_Pie Oh, what do the red dots represent? Sorry, still trying to learn raycast. Completely new at it.
@Beef_Pie
@Beef_Pie Год назад
@@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
@YourNormalRedditor
@YourNormalRedditor Год назад
Music?
@ASleep-er
@ASleep-er Год назад
I only want the music in this video because i'm bored
@firkejdjneii28283
@firkejdjneii28283 20 дней назад
what does red mean
@Beef_Pie
@Beef_Pie 19 дней назад
It means the raycast isn't hitting the ground
@bielsbd6984
@bielsbd6984 Год назад
Are you selling it?
@Beef_Pie
@Beef_Pie Год назад
probably not
@bielsbd6984
@bielsbd6984 Год назад
​@@Beef_Pie and could you make a tutorial or make it open source?
@Beef_Pie
@Beef_Pie Год назад
probably not
@Quandalous
@Quandalous 8 месяцев назад
Gimme O_O
@JayaJayaJaya21
@JayaJayaJaya21 Год назад
can you make this for me i will pay
@fantastikam
@fantastikam Год назад
But why
@Beef_Pie
@Beef_Pie Год назад
why not
@the.true.A
@the.true.A Год назад
cause its cool
@aafnixstriy
@aafnixstriy Год назад
have you try the sphere cast?
@Beef_Pie
@Beef_Pie Год назад
Working on it rn
Далее
Bye-bye Raycasting! There's a new kid on the block...
15:13
Dummies vs Noobs Alternative Part 1 [Roblox Animation]
2:19
Roblox Studio - Raycast Vehicle Suspension 2
9:30
Просмотров 64 тыс.
I think this video its good?
1:32
Просмотров 27
Realistic Vehicle Dynamics in Roblox Engine
6:08
Просмотров 202 тыс.
3 Hours vs. 3 Years of Blender
17:44
Просмотров 5 млн
The Fall of Roblox's Biggest Games
16:48
Просмотров 5 млн
4 Essential Blender Tips For Roblox Studio
4:50
Просмотров 122 тыс.
I Made a Secretly TERRIFYING Roblox Obby
13:31
Просмотров 73 тыс.
I Made a Fake Warning to Scare Roblox Players
16:31
Просмотров 1,5 млн