Search Unity

using DOTS physics, i got different results in headless and non-headless mode

Discussion in 'Physics' started by StivenUnity, Oct 20, 2019.

  1. StivenUnity

    StivenUnity

    Joined:
    Jun 18, 2015
    Posts:
    7
    hello. I'm using unity dots physic packages on example project of tanks! I have converted game to networked game by transport package. over-testing physics, I found an issue.
    when I built project on headless mode (Server Mode), the bullet of tank collides wall so fast, And the bullet is destroyed when it starts. no animation!
    but when I run the server in editor and windows client connecting, bullet animated and the code works nice.

    the code to force bullet:
    Code (CSharp):
    1.  
    2. var shootPosition = currentTankMatrix.MultiplyPoint3x4(tankShootDataArray[i].LocalFirePoint);
    3. EntityManager.SetComponentData(bulletEntity, new Translation {Value = shootPosition});
    4. EntityManager.SetComponentData(bulletEntity, rotationArray[i]);
    5. EntityManager.AddComponentData(bulletEntity, new VelocityMergingData {Linear = force});
    6. EntityManager.AddComponentData(bulletEntity, new ServerParentTankData {Value = tankEntitiesArray[i]});
    7. EntityManager.AddComponentData(bulletEntity, tankMatchIds[i]);
    8.  
    how can I fix this to get the same velocity results on headless and non-headless build?