0 votes

Can someone help me out with something? I am making a game where you have to jump into a mini-game to gain energy. I want the mini-game to lay on top of the main game while it is paused. The only problem is even though I have the mini-game scene's pause mode set to process none of the collisions are being processed. Is there a way around this? I assumed that if the mini-game scene was set to process pause mode it would still process the physics/collisions of the mini-game?

asked Aug 10 in Engine by asixjin (17 points)

1 Answer

0 votes
Best answer

You say that pausing stops physics server too but you want it active?

Well... it seems that here is your problem
https://github.com/godotengine/godot/blob/15db793ef277b6d2c3aae5e5a075ba2ece31b27a/scene/main/scene_tree.cpp#L871

As you can see, pause stops the physics servers but set_active is exposed to GDScript so, after setting pause, you can do:

PhysicsServer.set_active(true)

Use Physics2DServer if is for 2D.

answered Aug 10 by eons (6,498 points)
selected Aug 10 by asixjin

Thank you! That did the trick. Everything else is still paused excepted for the mini-game including the collisions.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.