I’m new to Blender, don’t know Python, and am using B v2.49.
I’m trying to make a model viewer using the Game Engine, and would like to provide that the user could cause a reset to how the model originally presented at startup. I think I know how to begin to allow for a script to do that via the logic bricks, though I don’t know how to write the script to actually do it.
At present, the model is only allowed to be rotated by user, so all I need right now is to reset rotation (of parent emptymesh) to original orientation. (Later, if I provide “exploded view” capability, I’d have to reset individual objects to original positions)
From reading tutorials etc and some help from others, I think what I need would be a script which:
- checks to see if it’s been run before or not, and,
- if not run before, gets current (initial) orientation of an emptymesh (all other objects are parented by it, so they should follow whatever is done to it, I think), saves that info in some way which can be accessed by future execution of script, and does nothing else;
- if has run before, then does not get current orientation of enpty mesh, but does retrieve previous initial orientation info, and uses that info to set emptymesh orientation to that initial condition.
Can anyone show me what such a script would look like?
(I’m trying to do it with a script because when I tried using a logic actuator to Restart Scene, for some reason it takes about 10 seconds to accomplish this, and I’m hoping a “simple” rotation would happen much quicker, as rotating in the BGE does work fine/quickly)