Regenerative Braking for electric cars

Discussion in 'Content Creation' started by Flanky, Jul 1, 2019.

  1. Flanky

    Flanky
    Expand Collapse

    Joined:
    Jun 30, 2019
    Messages:
    10
    Is it possible to change the camso_engine.jbeam to allow the engine for regenerative braking for an electric motor or is it in another .jbeam or is it not possible?
     
  2. Flanky

    Flanky
    Expand Collapse

    Joined:
    Jun 30, 2019
    Messages:
    10
    bump?

    The problem is that when changing combustionEngine into electricMotor, changing the jbeam file to fit the electricMotor and loading it into the game, the car itself does NOT regen when letting off the throttle, unlike the stock sbr4. I have checked the sbr4 electric variant and its camso_engine.jbeam file, but I am unable to see anything related to the regenerative braking (unless i didn't check it deep enough.) Any help would be appreciated.
     
  3. Capkirk

    Capkirk
    Expand Collapse

    Joined:
    Nov 19, 2017
    Messages:
    666
    The regenerative braking is caused by the electric motor controller. You need to add the electric motor controllers too. If you're using the SBR as reference, make sure you're also using the SBR vehicle controller.
     
  4. Flanky

    Flanky
    Expand Collapse

    Joined:
    Jun 30, 2019
    Messages:
    10
    Well can you explain how I could possibly do so?
     
  5. Flanky

    Flanky
    Expand Collapse

    Joined:
    Jun 30, 2019
    Messages:
    10
    bump?
     
  6. default0.0player

    default0.0player
    Expand Collapse

    Joined:
    Nov 30, 2018
    Messages:
    359
    In your engine jbeam, add this
    Code:
    "vehicleController": {
            "shiftLogicName":"electricMotor"
            "motorNames": ["rearMotor", "frontMotor"]
            "topSpeedLimitReverse": 15
             },
    delete all transmission related code

    In your differential jbeam, connect it directly to the electric motor
    Code:
    "powertrain" : [
            ["type", "name", "inputName", "inputIndex"]
            ["differential", "differential_R", "rearMotor", 1, {"diffType":"open", "friction":8, "uiName":"Rear Differential","defaultVirtualInertia":0.25}]
        ],
     
  7. Flanky

    Flanky
    Expand Collapse

    Joined:
    Jun 30, 2019
    Messages:
    10
    What does the defaultVirtualInertia do?
     
  8. Flanky

    Flanky
    Expand Collapse

    Joined:
    Jun 30, 2019
    Messages:
    10
    Do you know if you can do this to a automation exported car?
     
  9. Flanky

    Flanky
    Expand Collapse

    Joined:
    Jun 30, 2019
    Messages:
    10
    Ok so I've done it. But apparently the electric motors aren't connected to the wheels because even when I engage drive and accelerate, it doesn't move.
     
  10. Flanky

    Flanky
    Expand Collapse

    Joined:
    Jun 30, 2019
    Messages:
    10
  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