I recently explored using RigidBody2D.AddForce to move my sprites around on the screen, instead of translating the gameobjects directly in FixedUpdate.
When the user pauses my game, I was saving the velocity of the RigidBody2D and then setting IsKinematic to true.
When the user resumes the game, I would re-apply the Force and wake up the RigidBody2D object.
I noticed that when the user resumes, there is a delay before the objects starts moving again, and it is a small delay and it is intermittent, but very noticeable. Does it take Unity a few cycles before it is able to process all the wakeup's across all the objects? Switching back to my transform.Translate() method, there is no delay when the game resumes.
Is Physics2D expensive computationally?
↧