Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to Simulate Drunk Driving #247

Open
Guaziboi opened this issue Jan 31, 2024 · 5 comments
Open

How to Simulate Drunk Driving #247

Guaziboi opened this issue Jan 31, 2024 · 5 comments

Comments

@Guaziboi
Copy link

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!

@aivora-beamng
Copy link
Contributor

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?

@Guaziboi
Copy link
Author

Guaziboi commented Feb 5, 2024

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.

@aivora-beamng
Copy link
Contributor

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).

@Guaziboi
Copy link
Author

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.

@aivora-beamng
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants