-
-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Heightmap collision generation via PhysicsServer causes game to freeze for over a minute #290
Comments
@droc101 Please upload a minimal reproduction project to make this easier to troubleshoot. Also, try upgrading to Godot 3.4 as it features many physics fixes and optimizations. Did you change any project settings such as the physics engine or the thread model? |
I will try it with 3.4, I did change some graphics settings to make it perform better on my hardware, including changing to a multi threaded model. I will try to work on a reproduction project. |
This most likely is your culprit. |
Changing to 3.4 and Single-Safe thread model fixed all the issues! Thanks for the help. |
If using Bullet (the default 3D physics engine in Godot 3.x), this may be due to godotengine/godot#30027. |
Describe the bug
I'm not sure if this is the right place to put this, but when loading the scene in game with a large heightmap, the game freezes for multiple minutes. I have done some troubleshooting and believe that the line causing the issue is
PhysicsServer.shape_set_data(_shape_rid, shape_data)
inhterrain_collider.gd
. The only modifications I made to the plugin was changing the maximum terrain size to 8193 (from 4097), and adding timers with OS.get_ticks_msec() to time functions for debugging.Again, I'm not sure if this is the correct place to put this, as it might be an issue with PhysicsServer or something like that.
In case it matters, I am using the MultiSplat16 shader.
To Reproduce
I can't seem to reproduce the issue in other projects, but it might be possible to do so by creating complex terrain with a large size.
Expected behavior
The collision should not take over a minute to be added to the physics server.
Environment
The text was updated successfully, but these errors were encountered: