Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Arcade game gravity

Discussion in 'General Discussion' started by koval832, Apr 14, 2014.

  1. koval832

    koval832

    Joined:
    Mar 31, 2013
    Posts:
    5
    sorry if i'm not the first with this question but...
    is this normal practice to change gravity constant in arcade games?
    my case is connected with arcade race game where car get max speed in about 2sec (in real world we get it in 10-20 sec, right? but its too boring for game) and while car overcomes a hill and jumps with g=9,81 it seems like a swimming in jelly :)
    so, is any advices to calculate right forces, wheels friction curve and stiffness, suspension, etc? or just estimate on eye? :)

    thanks!
     
  2. ShilohGames

    ShilohGames

    Joined:
    Mar 24, 2014
    Posts:
    2,980
    There is obviously a difference between making an arcade game and making a simulator. For a simulator, you want to compute all of the physics very accurately. For an arcade game, you want to computer those things quickly and you want to prioritize fun over realism. With an arcade game, you will probably ignore a lot of the forces and come up with simple equations to approximate the experience you are trying to deliver.
     
  3. koval832

    koval832

    Joined:
    Mar 31, 2013
    Posts:
    5
    so, answer on question about gravity is "yes" and other forces just estimate on eye?

    thank you! i just thought that i missing something with my model, but changing gravity solves a lot.
     
  4. DallonF

    DallonF

    Joined:
    Nov 12, 2009
    Posts:
    620
    I almost never leave gravity at the "realistic" default of 9.81. It feels too floaty to me. I normally kick it up closer to 20.
     
  5. landon912

    landon912

    Joined:
    Nov 8, 2011
    Posts:
    1,579
    I always leave gravity alone and change the mass of the object. Would this be considered bad practice?


    Edit: Wouldn't the size of your world effect the way the physics play out? Maybe scale your world to the real world size?
     
  6. casimps1

    casimps1

    Joined:
    Jul 28, 2012
    Posts:
    254
    Lots of games don't use "real" gravity constants. Tweak it to suit the feel you're looking for.

    You may also want to look at the Rigidbody properties like Drag.
     
  7. shaderop

    shaderop

    Joined:
    Nov 24, 2010
    Posts:
    942
    It's normal to do whatever it takes to get the results that feel right to you. But making a point of starting out with dimensions and masses that approximate those in the real world could save you a lot of trouble later on and help you get to the desired results faster.

    No, but I don't think changing the mass will compensate for the effects of gravity. v = v0 - a * dt. No m in there.
     
  8. Pati-Co

    Pati-Co

    Joined:
    Jan 9, 2014
    Posts:
    56
    In my opinion it MUST be in arcade games. Arcade is not simulator or something like this, it has right to be funny :)
     
  9. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,738
    Counterintuitively, mass has no effect on gravity in this scenario. An object of mass 1000 falls at precisely the same rate as an object of mass 0.001. Only relative masses matter (that 1000-mass object will of course kick the 0.001-mass object all over the place and never even feel it).

    It is indeed world scale that matters. If you build your world with the scale of 1 unit = 1 meter, then gravity will be "correct" and things won't feel "floaty". If you use 1 unit = 1 foot, then naturally you should set gravity to the value of G in feet/sec/sec (which is around 32 IIRC).
     
  10. TylerPerry

    TylerPerry

    Joined:
    May 29, 2011
    Posts:
    5,577
    If I'm going to need to change the physics lots, generally I'd take it as a sign that perhaps physics are not the right answer to the problem at all.