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.

Bug Rigidbody interpolation breaks handles (manual reposition)

Discussion in 'Physics' started by Qriva, May 20, 2023.

  1. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    1,358
    Unity 2022.2.16
    I noticed something is wrong when I try to move objects on scene during playmode. After some testing it looks like there is some problem with rigidbody when interpolation is enabled.
    To be more specific, when I pause the playmode and move the object on scene, then after unpause (or step) it returns back to original position. In case I try to move the object without pause it actually moves, but with huge random lags.
     
  2. arkano22

    arkano22

    Joined:
    Sep 20, 2012
    Posts:
    2,063
    This is kinda obvious and may not be the source of the issue you're asking about, but to move a rigidbody in a way that's consistent with interpolation you need to use Rigidbody.MovePosition/MoveRotation

    Setting transform values directly will mess with interpolation, since transform position/rotation are calculated from rigidbody state.
     
  3. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    1,358
    To be more precise from my obervations, until now setting transform just disabled interpolation for that frame, however I am not talking about script, but handles in scene view.
    upload_2023-5-22_14-29-5.png