Hey! I was wondering if it is possible to have two different gravity settings? I mean, if you start the map, you'll have the standard earth gravity (-9,81) ...but if you enter a "zone" you'll have moon-gravity for example. I tried to insert a "BeamNG Environment Trigger" and changed the gravity value...but nothing happened when I enter the zone. Thanks in advance! Michael (MysterManGER)
Hey, you can use BeamNGTrigger for that which will execute the corresponding lua code. Go to Library -> Level -> BeamNG (top right corner) and create a BeamNG Lua Trigger. Once created you can add lua code to the luaFunction field. Accordingly to your request I have this little code snippet for you: Code: local function myGravityTrigger (data) if data.event == "enter" then environment.setGravity(0) else environment.setGravity(-9.81) end end return myGravityTrigger This will execute the local function myGravityTrigger. If you enter the trigger we set the gravity to 0, once we leave it we set the gravity to the default value again. If you have questions, don't hesitate to ask.
Hey! Just another question regarding the gravity. We can use positive or negative gravity-settings...but would it be possible to have sideways gravity? Or a gravity around a center (like a planet where you can drive around without falling off? And what else is possible with the "BeamNG Trigger" except changing the gravity? Thanks in Advance!
I have no idea about sideway gravity, but I know that gravity around a center isn't possible because it would require to expand the complexity of the gravity calculations and it would be too computer intensive to be reasonable for a feature that wouldn't be used often. And with the BeamNGTrigger, you can call any piece of lua code so really you can do a lot (changing to a cinematic camera like in gridmap or the senseless destruction scenarios, triggering sound effects, teleporting and spawning vehicles or any static mesh really, showing a text message, etc... with some creativity almost everything is possible, you can take a look in the BeamNG/lua directory to see everything that runs on lua in BeamNG)
As @RyvyLo already mentioned, there is no sideways gravity etc. Also this kind of planetary gravity is unfortunately not there as well. You may need to hack something together Furthermore there is a wiki page which contains some of the lua functions. It's far from being complete but we're working on it to add more and more to it.
Just an idea: could you possibly make "sideways" gravity with wind? It's not exactly the same but I guess that could work?
If wind could be used just inside a trigger zone...maybe... have to try it. @RyvyLo & @meywue: Thanks, must have a look at it if I have a lot of time. Never used lua codes before... don't know how to configure them correctly at the moment. It's a completely new topic for me But awesome support guys! THANKS!
Actually thought of wind as well but haven't had the guts to mention it since it's the super-hacky way of doing it!
Nope, G force is a global setting. But I am still looking for a mode to add a new preset like MicroGrav. (0.05) such as an asteroid or MacroG. like a Black Hole.
There was actually planets gravity added to some updates ago, but I forgot the code how to use it, it could be relevant to ancient question though as now there is all those new possibilities available.