Solved How to disable manual steering

Discussion in 'Mod Support' started by Stiegfried, Jun 24, 2018.

  1. Stiegfried

    Stiegfried
    Expand Collapse

    Joined:
    Feb 17, 2018
    Messages:
    16
    Hello everyone,

    I know this might sound a little weird but I would like to disable steering inputs from the drive in a scenario. I know you can't change the steering manually while the ai is enabled but I want to disable steering without the ai and I can't figure out how the ai turns the manual input off.

    Has anybody an idea on how to do this?

    Thanks in advance,
    Stiegfried
     
  2. metalmuncher

    metalmuncher
    Expand Collapse

    Joined:
    Aug 6, 2012
    Messages:
    257
    You can override the user's input by overwriting electrics.values.steering_input each gfx frame.
     
  3. aljowen

    aljowen
    Expand Collapse

    Joined:
    Oct 21, 2012
    Messages:
    1,677
    You could remove or change the steering binding in your settings if you only need a temporary method.
     
  4. Stiegfried

    Stiegfried
    Expand Collapse

    Joined:
    Feb 17, 2018
    Messages:
    16
    Where would I do that? And would I be able to de-/reactivate the real steering input without loosing too much performance?

    That might be a solution to my problem if I can delete and reassign the keybinding automatically by the lua file of a scenario. I can't find the bindings in the console though. Any idea where I might find it? Only tried dump(settings.getValues()) so far.


    Also I found the setting 'disableSteeringwheel' which doesn't seem to do anything for me. But I don't have a hardware steeringwheel. Therefor I suspect this to only deactivate real hardware steeringwheels which in fact would be totally fine for my purposes.
     
  5. metalmuncher

    metalmuncher
    Expand Collapse

    Joined:
    Aug 6, 2012
    Messages:
    257
    I've done it within a vehicle lua extension before, not sure if there would be issues if it was from a scenario for example. Performance seemed pretty much unaffected, I was doing PID control of the steering with no issues.

    Also I would guess the disablesteeringwheel is the setting that hides the ingame steering wheel from the interior of the cars.
     
  6. torsion

    torsion
    Expand Collapse

    Joined:
    May 31, 2015
    Messages:
    1,600
    I doubt that there would be a big performance impact. You'd create a function which does a check to decide whether or not to overwrite that electronics value. Then you'd map it to the updateGFX hook like M.updateGFX = myFunction()

    I didn't really read it, but this might be a decent example:
    lua\vehicle\controller\postCrashBrake.lua

    edit: oops, my mistake! I didn't see metalmuncher's last reply. Sorry folks!
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice