Adding force makes visible lag...

I’m trying to make a very simple game in Unity…
But my problem is, when i move an object with rigidbody2D.AddForce(…) it makes the object very laggy…
But not the game itself… I move the background with simple transform.position.x -= X; and its very smooth, but the Phisycs controlled objects are so laggy even by human eyes…

Can i somehow speed it up ? Like move the object in less update phrases… I think the engine only move them in every 5th or 10th Update hich is very annoying…

Physics updates at fixed internals however you can specify that the Rigidbody2D interpolate (for rendering purposes) using its interpolate property. This interpolates from the previous physics position to the current one so you get smooth movement each frame.

Also, adding a force simply modifies (during the physics update) the linear velocity so continually doing so will cause an acceleration. I’m not sure what you’re doing here or what results you want however you are also free to modify the linear velocity directly using the velocity property however if this object is to be colliding with things then I don’t recommend that you modify the velocity directly.

1 Like

Fixed my problem, thansk for the answer very much…