if I want the rigidbody to stop for a moment (think of it as freezing in time, only this object, while others are still working) I should save it's velocity and angular velocity on FixedUpdate and restore it on FixedUpdate as well, correct?
the the thing is - I need the object to always react the same - imagine us going back in time after the object is frozen (but before it's unfrozen) and each time we should see the "unfrozen" rigidbody reacting the same. Acting just as it was (and as it would be, if it wasn't frozen);
so in part-pseudocode - I assume - restoring velocity and angularVelocity in fixedUpdate like
function Update(){
if press a button //freeze
yield WaitForFixedUpdate;
saveVelocity = rigidbody.velocity;
saveAngularVelocity = rigidbody.angularVelocity;
rigidbody.isKinematic = true;
if press a button for the second time //unfreeze
yield waitForFixedUpdate
rigidbody.isKinematic = false;
rigidbody.WakeUp();
rigidbody.velocity = saveVelocity;
rigidbody.angularVelocity = saveAngularVelocity
} ?
would do the trick, correct?