alexey.egorov Posted September 9, 2012 Share Posted September 9, 2012 When we want to do something like backward rewind, we get some problems with BodyFracture (& potentially created/removed bodies). When we do rewind, all is ok, but crack pieces are still enabled & we can`t get it work propertly using script. I have some notes about how to do it right modifying physics.saveScene() & physics.restoreScene() logic: 1. We need to save body enabled/disabled state. 2. When actual scene has no physics body, but we want to restore scene which contains it, we need to ignore such bodies (now it crashes engine). 3. When we make restoreScene, we need to disable bodies, which is not exist in savedScene. To make this system more flexible, it can be possible to make some parameters (ignore / warning / create not existing, disable / remove not saved, compress freezed bodies (may be this needs to ignore performance optimizations)). Also i want to have some functions like saveScenesToFile. I think there is way to discard info about freezed bodies to reduce file size. This will be very useful for creating replay files. For now there is one way to do replay using save/restore state mechanism, and i think it is perfect way because of simplicity. But problem is in size of file which this system produce - it is not useful, direct video capture can be smaller size :D Link to comment
binstream Posted March 12, 2014 Share Posted March 12, 2014 Is the issue still actual? Link to comment
sebastianbah Posted May 7, 2014 Share Posted May 7, 2014 Approved that topic is not relevant. Link to comment
Recommended Posts