Search Unity

  1. Going to #UniteBerlin? Bring a buddy & get 25% off the 2nd ticket! More info here.
    Dismiss Notice
  2. Famed game designer and creator of The Sims, SimCIty, and Spore is looking for a 3D artist to join their team. Join the challenge.
    Dismiss Notice
  3. Unity 2017.4 has arrived! Read about it here.
    Dismiss Notice
  4. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  5. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  6. We've opened a new World Building sub-forum to faciltate all your world building discussions! Drop in and ask any ProBuilder, ProGrids, or PolyBrush questions.
    Dismiss Notice
  7. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

2D Physics : Manual Simulation, Simulation Groups & Multiple Worlds

Discussion in '2D' started by MelvMay, Apr 16, 2017.

  1. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    1,311
    I just don't follow what you're saying and it seems to be going in circles. I also have no idea what you mean when you say "nothing goes wrong".

    If Time.deltaTime and Time.fixedDeltaTimeare identical then it'll enter the loop each and every time only once as it checks >=.

    Why not just try this yourself rather than trying to convince me this doesn't work. Also, for the final time; please post on another thread. You've effectively took over this thread for your own purposes.

    Thanks.
     
  2. Deeeds

    Deeeds

    Joined:
    Mar 15, 2018
    Posts:
    150
    Why don't I try it?

    LOVE TO!!!

    But where/how do I set fixedDeltaTime independent of the cycle rate of FixedUpdate() ?

    They seem to be the same thing, but without control of which is first. It seems impossible to know if the FixedUpdate is called before the manual simulation, or after it.
     
  3. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    1,311
    All this information I have provided to you already in the links above showing you how to set the time and what the order is for the MonoBehaviour callbacks etc.
     
  4. any_user

    any_user

    Joined:
    Oct 19, 2008
    Posts:
    285
    Going back to the original topic of this – I'd be very interested in multiple 2d physics worlds.

    In a game we're working on, we're using cavalier perspective. There is a ground plane at which we look from a 45° angle, and there are vertical planes that are aligned to the camera. We use 2d physics for the ground plane. So circles on the ground turn into ellipses etc. Sprites "standing" on the ground are rendered completely flat because they are aligned to the camera (like billboards, but they can still be rotated on the vertical axis).

    There are some scenes, in which we would like to use 2d physics on some of these vertical "sprite-planes" in addition to the normal ground physics. Right now that's very complicated to do, the only easy way is to either use ground physics or sprite-plane-physics for one of these sprites. Or we could simulate it somewhere on the ground plane and then project it to the visible plane, but that seems very cumbersome. For this it would be very useful to have small 2d physics worlds, one for each 2d object that uses physics in local space.

    Is that a use case that would be supported with your approach of having multiple worlds?
     
  5. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    1,311
    This feature will be going into 2018.3 and is pretty much complete already. Your scenario will be possible with the feature.
     
  6. any_user

    any_user

    Joined:
    Oct 19, 2008
    Posts:
    285
    Great to hear, thanks!