Smoothing x,y coordinates in Update method

Right now I have a prefab whose x,y coordinates are updated in the Update method.
But the results are too ‘jittery’. I need to smooth them somehow.

Can anyone suggest the best strategy?

Should I incorporate some sort of tween call?

myprefab.transform.localPosition = new Vector2(rects_.x-360, rects*.y-300);*_

While placing your script in FixedUpdate guarantees your code will only run at the preset fixed step, this method is often preferred for physics-exclusive logic (as unity will apply its physics to match the fixed frame rate).

A much easier way to smooth out movement in an update function is to work out how much time has passed, so that we move the object in relation to time, not how quickly the update cycles.

For this reason you have Time.deltaTime. All you need to know is if you multiply something by Time.deltaTime, it will behave in relation to time.

     myprefab.transform.localPosition = new Vector2(rects<em>.x- (360*Time.deltaTime), rects_.y-(300*Time.deltaTime));_</em>