Hi, I often hit Ctrl-S when in the physics view, in an attempt to save my changes - which doesn't do anything. What I really want is to save the editor.
It would be nice if the tool would warn you if you did that. Either that, or if it would do a save on the editor that spawned it.
"Saving" while in physics view
Re: "Saving" while in physics view
Very true. I am holding off on that for now because in future, saving from a player view could potentially have different meaning (eg. saving the current positions of things in the player back to the editor, say to let a pile of boxes settle or just to allow more intuitive dragging things around etc). But perhaps, that could be assigned to a different combo like Ctrl+Shift+S maybe... will think about it.
Re: "Saving" while in physics view
Saving from the player view to the editor or to json would be a great feature!
Re: "Saving" while in physics view
Ok, I do not like the word, but it fits perfectly here: this feature would be epic!iforce2d wrote: saving the current positions of things in the player back to the editor, say to let a pile of boxes settle or just to allow more intuitive dragging things around etc
Re: "Saving" while in physics view
Let me be more verbose
In inital phase, right after loading of the rube scene, all objects are awake, so simulation can get really chopy. If one would wait untill multiple piles of rocks or other stuff settle down, this inital lag would be gone.
During the gameplay quite ofthen only a fraction of objects is awake, but after loading the scene- all of them are awake. Won't it be great to have it fixed without having to change anything in our loaders?
In inital phase, right after loading of the rube scene, all objects are awake, so simulation can get really chopy. If one would wait untill multiple piles of rocks or other stuff settle down, this inital lag would be gone.
During the gameplay quite ofthen only a fraction of objects is awake, but after loading the scene- all of them are awake. Won't it be great to have it fixed without having to change anything in our loaders?
Re: "Saving" while in physics view
The idea of saving from the player view is to get piles of things into the position where they are already settled, rather than change their awake status.
Although there is an 'awake' property in the properties panel for bodies, and this works in the RUBE player view, this is perhaps a bit misleading in that it does not guarantee the bodies will be asleep when loaded from the scene file. There are many things that can wake bodies, for example creating a fixture nearby with an overlapping AABB. To be 100% sure that things which are supposed to be asleep are really asleep, your program will most likely need to do this after loading.
Even without being able to save from the player view, running a few world steps after loading will let piles of bodies sleep. The advantage of saving from the player view is that they will sleep quicker since their velocities start at zero and they have nowhere to move, and you will be able to preview in the editor exactly where they will be.
Although there is an 'awake' property in the properties panel for bodies, and this works in the RUBE player view, this is perhaps a bit misleading in that it does not guarantee the bodies will be asleep when loaded from the scene file. There are many things that can wake bodies, for example creating a fixture nearby with an overlapping AABB. To be 100% sure that things which are supposed to be asleep are really asleep, your program will most likely need to do this after loading.
Even without being able to save from the player view, running a few world steps after loading will let piles of bodies sleep. The advantage of saving from the player view is that they will sleep quicker since their velocities start at zero and they have nowhere to move, and you will be able to preview in the editor exactly where they will be.