Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

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,723
    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,723
    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.