Search Unity

ProcessEventsInBothFixedAndDynamicUpdate removal in 0.9.0-preview

Discussion in 'Input System' started by Gooren, May 9, 2020.

  1. Gooren

    Gooren

    Joined:
    Nov 20, 2015
    Posts:
    332
    Noooooooooooooooo!!! :(

    We need this feature for mouse delta based smooth rotation of a rigidbody with joint attached non-kinematic rigidbodies in both Update (for rendering) and FixedUpdate (so that the physics ends up perfectly aligned/synced with the rendering).
    This issue is most noticeable when you move the mouse at a ~ constant speed. Player camera is rotating beautifully, but the joint rigidbodies are not. They seem to "jitter" a bit.

    I just need our mouse look Vector2 to be accumulated separately in FixedUpdate as well. Not just in update. So that perfectly smooth rotation from both rendering and physics perspective can be achieved.

    This is impossible without the ProcessEventsInBothFixedAndDynamicUpdate option.

    EDIT: I just read about time slicing that should be present in the New Input System. But if I understand it correctly, it doesn't work. At least in my case. Since I get same delta in all fixed updates as in last update. Always :(

    EDIT2: I thought how smart I am by trying to calculate the delta myself, thinking at least actual current mouse position could be fetched from the fixed update. Alas, I was mistaken. Can be done with old input system. But the new input system always shows the last mouse position from update in all successive fixed updates as well. So a dead end, again.
    As a workaround, I will use the old input system for this one particular input instead. At least until this is fixed in the new input system.

    Unity: 2019.3.13f1
    Input System: 1.0.0
     
    Last edited: May 10, 2020