Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

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,105
    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:
    1,605
    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,105
    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