Solved Lua Update Frequencies

Discussion in 'Mod Support' started by aljowen, Jun 28, 2017.

  1. aljowen

    aljowen
    Expand Collapse

    Joined:
    Oct 21, 2012
    Messages:
    1,677
    Currently the off road cruise control on the R60 isn't able to fully utilise the vehicles abilities. This is because when the vehicle starts to get low on traction it starts aggressively pulsing the throttle, reducing traction further. The pulsing comes from there being very little resistance on the wheels from spinning, combined with the update speed of the cruise control system, meaning it tries to over compensate.

    I am tempted to try and implement a smoothing system to mitigate that issue, however higher update frequencies would likely be a better solution, since the less smoothing that needs to be done, the more accurate the system can be.

    Currently the off road cruise control updates on graphics update, which is presumably the same frame rate as the graphics engine is running at. In my case that varies between 60-75hz based on what screen I run on.

    Are there any different update rates that I can use in order to make the cruise control update more frequently (with it in a separate function to prevent less important stuff from updating fast), for example on physics update which would make the code run way more often (2000hz afaik?). Probably doesn't need to be that fast, but will probably need to do some testing if there is more than one option that is faster than gpu update.
     
  2. thomatoes50

    thomatoes50
    Expand Collapse
    BeamNG Team

    Joined:
    Jan 31, 2013
    Messages:
    722
    Nope you can't, the fastest update rate will be your FPS.
    Try to apply some somethings or change the way you regulate the speed
     
    • Informative Informative x 1
  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