- Home /
SaveStates in a platformer
I decided to create a 2d platformer where you have to beat the world record but your bad so you use savestates to get a good run. I have working savestates that can save and load the player into his correct position but if he has any speed my move function which resets the velocity with its own vector2. so when you load a savestate your character just freezes even if he should have the velocity to keep on going forward. (note i do use input.getaxisraw so the movement is more snappy feeling which also applys in air. Also i have experimented with shutting off the movement which works but then you lose controll. I also havent really found a solution with lerping either)
How are you setting the character's velocity? Is the state saving/loading being done entirely in Update()? Have you tried splitting off Rigidbody2D changes to occur on the first available FixedUpdate() after loading a state?
There are a lot of little details you could provide that would be helpful in diagnosing the problem you're facing (such as relevant excerpts from your script(s)).
Your answer
Follow this Question
Related Questions
saving array to bin file 0 Answers
Saving game in play mode? 1 Answer
PlayerPrefs not saving in build 1 Answer
2D 360 degress platformer example needed 0 Answers
Platform Effector 2D with rigidbody2D 0 Answers