So after the lackluster door hydros for the Zephyr and a failed attempt at making a backup camera, i thought i'd do something different and try and make an airbag similar to an early test by @NOCARGO . Originally it was going to be just a small feature for my vehicle mod here, but I was suggested to add it to other cars too. Also, a lot of people were wondering how they worked, which is the main purpose of this thread Heres a quick demo How does it work? (assuming you know a bit about how BeamNG works) The frontal airbags (driver and passenger) have a fixed node on the steering wheel and dash that is surrounded by 8 nodes each that act as the undeployed airbag. The mesh for this uses a glowmap and is set to invisible until the airbag deploys There are then hydros(expandable beams) connecting each node to the central fixed node I made a simple lua script that uses g-sensors to detect when to explode the airbag for both the front and side. The hydros then expand and the material for the airbag is set to be visible The side airbags are a bit different but also similar. Traditional curtain airbags deploy from the roof and go downwards. so a central fixed node would not be viable. Instead, I used a rail of fixed nodes attached to the roofline, and another rail of nodes underneath that use hydros to move downwards. The hydros need to move very fast in order for this to work. This gif is in 100x slow motion and should explain it pretty well: Does it work? Well, since there aren't really drivers in BeamNG cars, i can't really say for sure. But I tried using synsol's crash test dummy to test and it works ok, i guess? There isn't any way to tell if the dummy "survived" so you'd probrably have to use your imagination Issues: The main issues are improving the reaction time of the sensors. The lua is loosely based off the pre-existing "postCrashBrake" script that modern vehicles use to stop after crashing. However the response time is not the best and upon improving it I noticed sometimes the airbag misfires after going over rough bumps. Plans to improve this would be to use something similar to "beamState", where an action can be triggered upon breaking of a beam in conjunction to the g-sensors to improve accuracy this took a while to type lol im going to bed
some cars do do that because some bumps when going over can simulate a crash. Maybe raise the tolerances a bit. Modern cars don’t have their airbags go off if the speed and impact is too low. Older cars tho any impact will trigger it. Great idea tho, I’ve been waiting years for a mod like this. Gonna follow closely and will help any way I can.
dang that sounds really complicated, but its cool to see airbags in beamng finally! hope it can released soon
Could you possibly have the airbags deploy faster? Atm, it looks like if there was a high speed crash, the dummy would hit the steering wheel, or the door, before the airbags deploy. Or, the dummy could have the airbag deploy while on the steering wheel, which could be a fatal blow. Otherwise, it's dope!
Oh WOW ! It seems you really pulled it off catching Buster with the airbag before he slams the wheel ! Very very well done @JsZ !
In reality I think they use G sensors to determine "survival" rates. If you could rig some sort of 3-axis accelerometer into the dummies' head, you may be able to see if there's a tangible difference in the G load the dummy experiences upon impact. The big problem I see with that is BeamNG vehicles already use an internal accelerometer built into the jbeam for things like wheel alignment, camera position ETC. so if you add a second accelerometer to the dummy there would be 2 of them in 1 vehicle, which might break the game... IDK how else you'd measure "survivability" though...
The only problem i have is that the airbag models are very unrealistic. Other wise this is outstanding
not sure how that'd work tbh but its a good idea yes i am working on it they're kinda unrealistic because in order to have the hydro pull it down without causing weird things, the mesh has to be low poly however i could work around this by using some glowmap trickery to switch out the mesh to a more realistic/highpoly one after the lowpoly airbag fully inflates