Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

Scripting Physics: Changes to avoid Physics transform drift by not sending redundant Transform updates.

Discussion in '5.4 Beta' started by hippocoder, May 18, 2016.

  1. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,725
    What is the meaning of
    • Physics: Changes to avoid Physics transform drift by not sending redundant Transform updates.

    Currently we have to do weird things like disabling interpolation and so forth or child rigidbodies act strangely. Is this part of that issue, or something else? Please explain :)
     
  2. MortenSkaaning

    MortenSkaaning

    Joined:
    Jan 16, 2015
    Posts:
    120
    The issue fixed was when an animator is set to an constant curve and emitting the same transforms over and over, the Rigidbodies receiving the transform updated messages would react by not being able to fall asleep. They would accumulate drift and eventually break the setup/scene.

    In the new code the transform components do not send an update messages if the transform set externally (like the animator) is unchanged from the previous transform. This makes the Rigidbodies asleep like expected and it prohibits the drifting.
     
    hippocoder likes this.
  3. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,725
    Thanks a lot - can you guys make a point of explaining things in depth whenever a change changes Unity behaviour? it would be a cool thing :)
     
  4. MortenSkaaning

    MortenSkaaning

    Joined:
    Jan 16, 2015
    Posts:
    120
    I'm pretty sure we're adding this for the 5.4 Upgrade Guide.