1. Trouble with the game?
    Try the troubleshooter!

    Dismiss Notice
  2. Issues with the game?
    Check the Known Issues list before reporting!

    Dismiss Notice
  3. Before reporting issues or bugs, please check the up-to-date Bug Reporting Thread for the current version.
    0.37 Bug Reporting thread
    Solutions and more information may already be available.

Assistance with Lua Scripting - Car defaults to reverse gear?

Discussion in 'Troubleshooting: Bugs, Questions and Support' started by Roy O, Oct 12, 2025 at 1:43 PM.

  1. Roy O

    Roy O
    Expand Collapse

    Joined:
    Yesterday
    Messages:
    1
    Hi,

    I am working on a project where we are using BeamNG.tech to recreate a real life Porsche crash that happened during a racing series. A requirement of our simulation is to have a Lua script that when ran, will spawn the Porsche vehicle as well as our fence prop that it will crash into. The Porsche's path is meant to mimic the real life Porsche's path, speed etc before contact with the fence.

    The spawning of the props, vehicles etc works pretty much fine. The big issue we are facing is that the car drives in reverse. It will still head towards the fence, but on its own weird reverse path. I have added a video as an example.

    We have troubleshooted for hours with our limited coding knowledge and a lot of AI and nothing has fixed it. Closest thing to a fix I have got is making the car drive forward (off our intended path) for a few seconds before entering reverse gear.

    Please can someone help us out! :) (Lua code is attached and example video)
     

    Attached Files:

  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