Search Unity

How to smooth player movement without using Interpolation?

Discussion in 'Physics' started by jamius19, Dec 31, 2015.

  1. jamius19

    jamius19

    Joined:
    Mar 30, 2015
    Posts:
    96
    First of all, I've a solid understanding of Physics, fixedUpdate, Update and Timestep...
    This isn't a typical noob question....

    With all that said, let's geFirst of all, I've a solid understanding of Physics, fixedUpdate, Update and Timestep...
    This isn't a typical noob question....

    With all that said, let's get to the point!

    I've a 2D game and followed all performance guidelines and getting a solid performance out of my game!
    I'm targeting android/iOS....

    I've got a jerky movement when using physics to move the player and LateUpdate() to move the camera...
    I know the reason of it :)

    now, if I turn on interpolation, physics runs smoothly but frame rate gets low....
    I also tried to move Camera in fixedupdate()
    that also makes it smooth as the player and camera are in sync but the frame rate goes down for time step....


    First of all, I've a solid understanding of Physics, fixedUpdate, Update and Timestep...
    This isn't a typical noob question....

    With all that said, let's geFirst of all, I've a solid understanding of Physics, fixedUpdate, Update and Timestep...
    This isn't a typical noob question....

    With all that said, let's get to the point!

    I've a 2D game and followed all performance guidelines and getting a solid performance out of my game!
    I'm targeting android/iOS....

    I've got a jerky movement when using physics to move the player and LateUpdate() to move the camera...
    I know the reason of it :)

    now, if I turn on interpolation, physics runs smoothly but frame rate gets low....
    I also tried to move Camera in fixedupdate()
    that also makes it smooth as the player and camera are in sync but the frame rate goes down for time step....



    so for the framerate,

    moving camera in FixedUpdate() == Using interpolation

    so, I wanted to know if you guys have any alternative solution?
    so for the framerate,

    moving camera in FixedUpdate() == Using interpolation