Search Unity

Push Back effect is stuttering when in slow motion.

Discussion in 'Physics' started by omegabytestudio, Apr 19, 2017.

  1. omegabytestudio

    omegabytestudio

    Joined:
    Nov 9, 2015
    Posts:
    77
    Hi All!

    I'm not that good with physics so it might be a simple issue.

    I'm currently using physics to simulate a push back on the player.

    The issue is, if I use slow motion, the push back will stutter during the animation (because Yes I have an animation).

    Here is the pseudo code.

    Change animation to player receiving a hit.
    rigidbody.addforce(transform.forward * 100) // I tried with velocity too

    As simple as that.

    I tried interpolate and extrapolate on the rigidbody and tried physic based update on the animator, still didn't work.

    Physics based updates weren't as bad, but it was still not smooth.

    Note : The weaker the push, the smoother it is.


    Thank you!