UPBGE / upbge

UPBGE, the best integrated game engine in Blender
https://upbge.org
Other
1.43k stars 180 forks source link

Camera messed at ge exit in some cases since readfile changes (Global Undo) 0.3+ #1825

Closed youle31 closed 1 year ago

youle31 commented 1 year ago

Since ebb5643e598a17b2f21b4e50acac35afe82dbd55 , there were some cases where camera view was not properly restored at ge exit.

During bge runtime, we sometimes change v3d->camera (in KX_Scene::RenderAfterCameraSetup). Before ebb5643e598a17b2f21b4e50acac35afe82dbd55 , Global Undo was correctly restoring the v3d->camera used before runtime.

Since this commit, it is not always the case like in this file:

multi_overlay_test.zip

I ping you @mont29 just in case it could have an interest for you.

To solve this, I'll just backup v3d->camera in embedded then restore it at ge exit.