Search Unity

Does physics entity order influence the deterministic result?

Discussion in 'DOTS Physics' started by lijianfeng, Oct 15, 2019.

  1. lijianfeng

    lijianfeng

    Joined:
    Sep 8, 2015
    Posts:
    54
    For example :
    I have tow physics world,I add them the same set of rigidbodies,but adding in different order,does the two world get the same result if I then step the world?

    more question:
    I have two physics world, one add some rigidbodies and later remove some of them,leave rigidbody set A,and another I direct aad the rigidbody set A into the world ,does the two world get the same result if I then step the world?
     
  2. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,162
    Yes order affects determinism. Generally speaking all deterministic data needs to live together in an isolated world.
    It would be a bad idea to put any data that is non-deterministic into the same world.

    (Both for the ability to validate determinism & generally because it might reorder entity iteration)
     
    illinar and lijianfeng like this.
unityunity