Renamed the objects in the scene (The object names didn’t match the ones addressed in the python code)
Switched the python controller to module mode and rewrote the python code (That way you can place multiple functions inside one script and access the controller directly via the “cont” argument
Added an overlayscene “Masterscene” with the corresponding pause / resume logic
You can pause and resume the scene by pressing the spacebar. Sample.blend (450 KB)
Edit:
Is saw you used dloc for movement. That way you “teleport” the object by the given amount of blenderunits ignoring the physics system which causes the playerobject to bounce off the walls since it gets teleported inside the obstacle.
I replaced the dloc with livV which adds a constant force to your player object.
i created this resume.blend (460 KB) with an overlay scene, resume and quit button shows if you press ‘R’. may you help me to code this thanks
i want to learn the coding in blender …