Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | MikeMikeMike |
Hi…,
my 3D game uses GodotPhysics, on Windows 10 this works correctly.
On iOS, after some level-starts GodotPhysics stops, the level opens, but no Physics is calculated anymore. (e.g. RigidBodies don’t fall/move anymore)
Therefore I have added this code to the levels, but this doesn’t fix it:
func _ready():
PhysicsServer.set_active( true )
Any ideas?
Thanks
Mike
everything else is working correctly ? Inputs, process(), animations, shaders ?
You can check linear velocity, sleeping, delta of physics_process(), step of integrate forces()
It is peculiar, that it happens after some time. I would assume it is about sleeping property. Or do You pause anything before it happens in code ? Or is there any yield() in integrate forces ?
Inces | 2022-06-14 13:55
Hi @Inces,
yes, everything else is working, as you said, inputs, process, animations, shaders.
You can check linear velocity, sleeping, delta of physics_process(), step of integrate forces()
Yes, good to know.
It is peculiar, that it happens after some time.
(Sometimes) after instancing and starting a new level.tscn file.
Or do You pause anything before it happens in code ?
No, I am not pausing anything.
Or is there any yield() in integrate forces ?
No, it’s not.
I will take a look at sleeping, delta of physics_process(), step of integrate forces().
Thanks
Michel
MikeMikeMike | 2022-06-14 19:33
Hi @Inces,
did more tests. I send my iOS app in the background. After opening it after some minutes and instancing/starting a new level.tscn I see this:
physics_process() is running
_integrate_forces() is not running anymore
Is this a bug? What to check?
Thanks
Mike
MikeMikeMike | 2022-06-16 19:52
It still sounds like what sleeping
does. Try to check it in various places of code, or just set can_sleep
of every instance to false
Inces | 2022-06-16 20:25
Hi Inces,
I’ve done more tests.
When one RigidBody has can_sleep=True, all other RigidBodies will not run integrate_forces() anymore, after some level-reloads on iOS.
This looks like a bug, I will report this here: [GodotPhysics and Bullet] One RigidBody with `can_sleep` enabled will stop `_integrate_forces()` for all RigidBodies, after some tscn-scene reloads · Issue #62182 · godotengine/godot · GitHub
Thanks again
Mike
MikeMikeMike | 2022-06-18 17:26