#7 Fixing moon like gravity


Someone tried to fix this already, but it seems it caused a more severe problem than what was going to be fixed by this since it caused the cars to sink into the ground:


To me it looks like a problem of a too high reference point of the vehicle files, but I actually don't know how gravity gets calculated in Trigger...


  • Onsemeliot

    Onsemeliot - 2014-05-20

    That's correct I never tried to use the patch since in the discussion of it the problem of the "diving" cars was confirmed. I would rather have moon like gravity than cars, that are partly hidden in the ground.

    Further more I find the idea of a gravity odd if it is appied only when no wheel touches the ground since the reason for leaving the ground in the first place is not touched by this. I think gravity should be applied all the time. If that doesn't work properly, I see a problem with the proposed solution...

  • Winston

    Winston - 2014-05-22

    Before I revise the C++ code, I have three questions on the new patch:

    Question #1:

    Quote from Farrer's comment "Anyway, if the force was applied as a real gravity, affecting the car all the time (to do it, just comment the "if(noContactCount == 4)" at "src/psim/vehicle.cpp" patched file), the car will enter the ground, acting as if it is of water and the car a boat, which is yet less desirable for a car game (maybe an anphibyous game? =^D )"

    (1) the new patch is created for the less-gravity on the moon.
    (2) we need to comment out "if(noContactCount == 4)" to adapt to the real-gravity on the earth.

    This means that "vehicle.cpp needs to detect which kind of map the player chooses?"

    Question #2:

    I can NOT find any moon map from the latest version of Trigger-Rally game.

    Would you please let me know which map in the following link is a moon map?


    Question #3:

    qubodup provides the Videos of driving straight on Smallswirl:
    without patch http://youtu.be/Hh82utIaLbg
    with patch http://youtu.be/O8lrpxeV9MA

    I can NOT quite understand qubodup's question: "Are there different physics depending on whether the car has contact to the ground or not?"


    What does different physics mean?

  • Onsemeliot

    Onsemeliot - 2014-05-22

    Hi Winston,

    Question 1 and 2:

    I think your first question derives from an unfortunate badly expressed thought. Even if there is a map called "Lunar" or "Far far away" in the event "Trigger Cup" which seems to refer to the moon, this is just ment optically. As far as I know nobody deliberately wanted to have moon-like gravity. This is just how the original game physics feel like.

    Farrer tried to fix the annoying problem of unrealisticly high and wide flying cars by adding gravity to it. But since this gravity caused the cars to enter the ground he worked around it by applying the gravity factor only when no wheel touches the ground. In my opinion this is not satisfactory because it doesn't create more realistic game physics. Therefore I never considered this patch as a solution.

    The link you are referring to are not the original single race maps done by the creators of Trigger Rally, but later additions from various people. The moon like map was done by the original creators as part of the first event: "Trigger Cup" and therefore can't be found in this folder.

    Question 3:

    Oubodup refers to the fact that Farrer applied the gravity facor only when no wheel is touching the ground. Farrer did that for a good reason since he ended up with cars sitting in the ground instead of driving over the ground when he applied the gravitational force permanently. Farrer confirmed that his patch was just a quick and dirty way of getting rid of flying cars.

    In my opinion the gravitational force might be a little to strong, but would work fine if you remove the limitation of it being applied only when no wheel is touching the ground and if you can fix the problem of the car sinking into the ground some other way.

    My problem with the patch at the moment is the effect, that it is still very easy to loose contact to the ground with some wheels. Therefore the most annoying part of the moon like gravity is not resolved by it. The car is still behaving like a boat on wild water and it's hard to steer if half of the time only two wheels are on the ground.

    I hope I could clarify some things here.

    Last edit: Onsemeliot 2014-05-22
  • Onsemeliot

    Onsemeliot - 2015-04-08

    Today I just added 150 units to all vehicle weights and I was surprised to not face the problem of cars sinking into the ground. Vehcles now are not as likely to take off at every pump, but they are still light enough to make nice jumps.

    I didn't expect all cars to have the same weight, but I didn't alter that. Originally the value was 1350. I adapted it to 1500 and I think it was an improvement.


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks