Electric Motor Idle Setting

Discussion in 'Programming' started by JeffTesta, Sep 27, 2019.

  1. JeffTesta

    JeffTesta
    Expand Collapse

    Joined:
    Dec 6, 2017
    Messages:
    75
    Is it possible to set a electric motor idle speed? I've tried something like "idleRPM":950, but it must not be supported by the electricMotor powertrain component.

    I'm trying to simulate an EV conversion that utilizes an accessory system like this: https://www.evwest.com/catalog/product_info.php?products_id=184
     
  2. Diamondback

    Diamondback
    Expand Collapse
    Vehicle Systems Lead
    BeamNG Team

    Joined:
    Apr 8, 2014
    Messages:
    1,957
    No, the electric motor in the game has no idle logic, you'd have to code that yourself by constantly giving it some throttle.
     
  3. JeffTesta

    JeffTesta
    Expand Collapse

    Joined:
    Dec 6, 2017
    Messages:
    75
    Cool, so I'll try to mess with a function that adds throttle below a certain RPM or something like that. Gotta learn Lua now :)
    All I have so far:

    local function onReset()
    local engine = v.data.engine

    if (M.rpm < 800) then
    M.throttle = 0.02
    else
    M.throttle = 0
    end
     
  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