Search Unity

Physics2D.autoSyncTransforms is not working in editor. Colliders don't sync with transform movement.

Discussion in 'Editor & General Support' started by pastaluego, Aug 23, 2018.

  1. pastaluego

    pastaluego

    Joined:
    Mar 30, 2017
    Posts:
    196
    Never had this issue from 5.6 to 2017.4, but ever since updating to 2018.2.4, and now 2018.2.5, I've had issues with colliders struggling to sync with transform movement in playmode in the editor. (I don't know how to show collider gizmos in build)

    I've supposedly read that changes were made to synctransforms at some point in 2018, and that they added autosynctransforms in Physics2D settings. But I have autosynctransforms enabled, and unity just can't seem to keep the collider synced to the transform I'm moving. If I click the editor to 'refresh' the gui, it updates it and it syncs for a second or two, but then it stops, and then it'll sometimes resync by itself for another second, and then stop syncing.

    To test it, I turned off autosynctransforms and manually called Physics2D.SyncTransforms() after each transform movement in the code, and it synced perfectly with no issues. So autosynctransforms just must not work. I also double checked to see if the collider actually was syncing, but the GUI maybe wasn't updating for some reason, but it wasn't syncing. I checked this by checking the collider.bounds.x position after each transform movement, and the collider was indeed not updating with the transform during the times autosynctransforms decides to stop working automatically. To back that up, I was watching the profiler as well and the calls to synctransforms stop during the times it stops autosyncing the transforms.

    *VERY IMPORTANT NOTE: I'm not using rigidbody2Ds on these objects I'm testing by choice. I just added rigidbody2Ds to them, and autosynctransforms works perfectly and doesn't randomly stop syncing.

    Ultimate bug report: Physics2D.autosynctransforms isn't consistently syncing transform.position changes for transforms without rigidbody2Ds.

    I submitted a bug report as well.
     
  2. pastaluego

    pastaluego

    Joined:
    Mar 30, 2017
    Posts:
    196
    I'd like to bump this post because it's still not fixed and is even worse now in 2018.3 than it was in 2018.2. I don't remember the bug report ID I made back then.

    *I submitted a new bug report, case 1109324
     
    Last edited: Dec 13, 2018