- Home /
Rewind? *confused*
Hello Unity3D developers. I am an indie developer and I am currently working on a "Portal" like game. What I want to do is rewind (turn the time back). How can I do this?
P.S. I'm using Unity3D 2.6
Answer by Unamine · May 13, 2011 at 12:44 PM
Ok, I figured it out, you could edit the code to achieve this effect. Or else create a script that records the position of gameObject every tenth of a second, and the type of animation that is currently running in your program to do two versions of each animation, one normal and one for when you're back in time When you're back in time, take the position gameObject animation and inverse ...
Hope this helps ..
Answer by Unamine · May 12, 2011 at 10:02 PM
Search for Replay project in Unity in the page: http://www.m2h.nl/unity/
Documentation in PDF and Replay Demo
be careful about following this implementation, alot of prediction it does is wrong. (try running in a tight circle then rewinding)
Answer by flaviusxvii · May 12, 2011 at 07:45 PM
PhysX will not allow you to reverse physics, so you'd have to do all of the physics yourself. (Or track and save the positions of objects so you can disable physics during backwards-time and move everything "backwards")
Answer by Bryan 4 · May 12, 2011 at 09:21 PM
Your going to want to do something along these lines. http://www.gamasutra.com/view/feature/2029/developing_your_own_replay_system.php Determine what states you need to save and what you can reverse calculate. It is a technique commonly used in racing game replay systems.
I was hopping for something more "Prince of Persia" like. But thanks for the answer. :)
Your answer
![](https://koobas.hobune.stream/wayback/20220613133811im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
A node in a childnode? 1 Answer
Slow Loading 1 Answer
Rewind time (or problems with arrays) 1 Answer
How to save and display players times using Playerprefs in Javascript? 1 Answer
How to create an Idle counter ? 2 Answers