BeamNGpy icon indicating copy to clipboard operation
BeamNGpy copied to clipboard

How to Simulate Drunk Driving

Open Guaziboi opened this issue 1 year ago • 5 comments

So I'm working with my university to develop a driving simulator that has the ability to have a "drunk driving" mode. Currently using OpenTrack to track the users head movements and this works perfectly. I feel like it would be easier to modify BeamNG to have the desired effect. Not sure what the best course of action is to accomplish my task. Any help is appreciated!

Guaziboi avatar Jan 31 '24 19:01 Guaziboi

Hi, that depends on the definition of what the "drunk driving" mode should include. To have a shakey camera for example, you could start with the shake camera mode implemented in lua\ge\extensions\core\cameraModes\shake.lua. What are the features that your "drunk driving" mode is expected to include?

aivora-beamng avatar Feb 05 '24 14:02 aivora-beamng

It just needs the general wavy/heavy head movement would be fine and it would need to be toggled on and off.

How do I activate the shake camera mode? Doesn't look like it's available within the game settings but I did find it inside the file.

Guaziboi avatar Feb 05 '24 16:02 Guaziboi

Hi, it's a camera filter, so you need to use it with another mode. I guess you're using the driver camera, so I edited it to use the shake filter and I attach it here: driver_shake.zip

You can unpack the folder to %localappdata/BeamNG.{drive/tech}/0.31/mods/unpacked and it should be recognized as a mod by BeamNG. You can then edit the parameters of the shake filter in the .lua file directly. To toggle it off and on, the easiest solution would be to switch with the normal camera (you can disable all the other modes in the settings).

aivora-beamng avatar Feb 06 '24 09:02 aivora-beamng

So as soon as I unpack the folder in the correct spot, would I see a difference in the camera behavior right away or would I need to adjust the values first? I've already unpacked it and there doesn't seem to be a difference.

Guaziboi avatar Feb 20 '24 18:02 Guaziboi

Hi, if you unpacked it correctly, then you should see the Driver_shake camera as one of the camera modes, and you can switch to it using the standard keyboard shortcut (C):

image image

aivora-beamng avatar Feb 21 '24 12:02 aivora-beamng