1. Trouble with the game?
    Try the troubleshooter!

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

    Dismiss Notice

Any way to "give" a car momentum?

Discussion in 'General Discussion' started by Raptorix, Jan 12, 2021.

  1. Raptorix

    Raptorix
    Expand Collapse

    Joined:
    Jul 28, 2017
    Messages:
    14
    So, is there any way to literally give a car momentum, as in maybe speeding it up instantly?

    Like to set a physics valvue to something somehow and then just watch a car fly off in game?
    I doubt there is, just posting this just in case lol
     
  2. LucasBE

    LucasBE
    Expand Collapse

    Joined:
    Mar 22, 2015
    Messages:
    2,481
    Gravity or wind
     
  3. Raptorix

    Raptorix
    Expand Collapse

    Joined:
    Jul 28, 2017
    Messages:
    14
    I know, but is there any way to literally set a cars velocity to a set value?
     
  4. Plymouth Superbird 1970

    Plymouth Superbird 1970
    Expand Collapse

    Joined:
    Nov 15, 2015
    Messages:
    1,156
    i don't think so.

    are you asking if there's a way so like, as soon as you spawn the car it's already going say, 50 mph?
     
  5. Raptorix

    Raptorix
    Expand Collapse

    Joined:
    Jul 28, 2017
    Messages:
    14
    Yeah, or if you pause the game and (maybe do something in the world editor?) then unpause and the car goes flying off
     
  6. LucasBE

    LucasBE
    Expand Collapse

    Joined:
    Mar 22, 2015
    Messages:
    2,481
    no that's not a thing unless you mod it somehow
     
  7. Agent_Y

    Agent_Y
    Expand Collapse
    Jbeam/QA support
    BeamNG Team

    Joined:
    Jul 10, 2020
    Messages:
    10,060
    That would probably tear the car apart instantly due to literally instant acceleration from 0 to whatever value you set, imagine the G forces
     
  8. Raptorix

    Raptorix
    Expand Collapse

    Joined:
    Jul 28, 2017
    Messages:
    14
    right
     
  9. Sithhy™

    Sithhy™
    Expand Collapse

    Joined:
    Apr 5, 2017
    Messages:
    3,344
    If I'm not mistaken, in the Research version of BeamNG, there ETK that is being driven around the map accelerates from 0 to 100km/h (I think) pretty much instantly yet it caused no issues for the jbeams or anything... So I guess it is possible, just got to know how
     
  10. Raptorix

    Raptorix
    Expand Collapse

    Joined:
    Jul 28, 2017
    Messages:
    14
    Okay maybe not instantly, but lets say 0-100 km/h in under a second, is there any way to do something like that in any car?
     
    #10 Raptorix, Jan 13, 2021
    Last edited: Jan 13, 2021
  11. SKB

    SKB
    Expand Collapse

    Joined:
    Apr 22, 2017
    Messages:
    1,964
    Kaboom.
     
  12. henryjhost

    henryjhost
    Expand Collapse

    Joined:
    Jan 1, 2018
    Messages:
    1,060
    You could spawn a car, get it up to that speed, and then teleport it to wherever you want with freecam and f7.
     
    • Agree Agree x 1
  13. Raptorix

    Raptorix
    Expand Collapse

    Joined:
    Jul 28, 2017
    Messages:
    14
    That's not really what im looking for, i mean a way to literally accelerate a car faster than it normally can
     
  14. Agent_Y

    Agent_Y
    Expand Collapse
    Jbeam/QA support
    BeamNG Team

    Joined:
    Jul 10, 2020
    Messages:
    10,060
    Uhh... add JATO? But seriously there could possibly be a LUA function for modifying node velocity and applying it to every node of a car would do the trick, if I knew how to do it I would make it a mod
     
    • Agree Agree x 1
  15. Raptorix

    Raptorix
    Expand Collapse

    Joined:
    Jul 28, 2017
    Messages:
    14
    Tried JATO

    Sounds interesting
     
    • Agree Agree x 1
  16. PriusRepellent

    PriusRepellent
    Expand Collapse

    Joined:
    Mar 19, 2018
    Messages:
    353
    G-Force would be infinity, undefined, or nan depending on how Lua handles that division by zero (time being the zero), causing instant instability and the game would pause. I have zero doubt in my mind that any attempt to set a velocity instantly would result in errors.

    There is no way around the time issue. You need to apply force to the car to change its speed. If you apply the force over a time of zero, read above. Nothing good will happen. You can, however teleport the car while in motion so you can have it appear at a point going a certain speed. This works well with cruise control for lower speeds.
     
  17. Raptorix

    Raptorix
    Expand Collapse

    Joined:
    Jul 28, 2017
    Messages:
    14
    I know, im now just looking for a way to make any car accelerate a lot faster than it normally can
     
  18. Trophy

    Trophy
    Expand Collapse

    Joined:
    Aug 26, 2019
    Messages:
    1,644
    just use the nodegrabber
     
  19. AX53

    AX53
    Expand Collapse

    Joined:
    Aug 6, 2013
    Messages:
    570
    I don't think that's true at all. Nodes experience sudden accelerations (instantaneous in the right situations) all the time during head on collisions. Otherwise the nodes would go trough objects when you crash, and that doesn't happen. The physics engine is obviously programmed in a way where division by zero is a non-issue. Just because the G-force in theory would be infinite doesn't mean it's a problem. As long as you don't do that specific calculation without clamping it it's fine. Plus, the G force wouldn't be /0. It would be /delta time (the time in between two frames).
    If it was in fact /0 then it would cause this infinity problem all the time because the velocities of a computer simulation change incrementally. Not smoothly.
     
    • Agree Agree x 2
  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