Saving Physics in motion

If I had a ball that is moving from the left side of the screen towards the right side and a user taps on a notification or they hit the home button on an iPad when the ball was in the middle of the screen, is there a way to save that info so that when they start the app again it continues where it left off from the middle of the screen to the right with the same trajectory and velocity etc … ?

If so how would I do that ?

Thanks in advance,

Scott

When an alert comes up or the user hits the home button, your app will be in a “suspended” state.  When they start the app again, it’ll continue right where it left off, including the movement of physics objects.  (That’s true unless you’ve put UIApplicationExitsOnSuspend in your build.settings, but there aren’t many reasons why you’d want to do that.)

  • Andrew

When an alert comes up or the user hits the home button, your app will be in a “suspended” state.  When they start the app again, it’ll continue right where it left off, including the movement of physics objects.  (That’s true unless you’ve put UIApplicationExitsOnSuspend in your build.settings, but there aren’t many reasons why you’d want to do that.)

  • Andrew