Search Unity

Physics2D and different gravity

Discussion in 'Physics' started by Nembroten, May 17, 2019.

  1. Nembroten

    Nembroten

    Joined:
    Nov 28, 2013
    Posts:
    9
    Hello,
    i have 2 scenes exisitng at the same time and I need them to have different gravity, one (0,0) and another (0,-1)
    i noticed the global setting gravity for Physics2D is applied to ALL scenes and I can't find a way to set a gravity per scene. I know I can just add some constantForce to all objects on one scene to get desired effect, but myabe there is simpler way?
     
  2. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,474
    Unfortunately per-scene settings was work that was planned but still hasn't happened yet. The only conceivable way to do it would be to have a script that sets (or just set yourself) each Rigidbody2D.gravityScale to -1 in the other scene.