-
-
Notifications
You must be signed in to change notification settings - Fork 20.9k
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
Huge slowdown when raycasting large HeightmapCollider #24390
Labels
Milestone
Comments
Zylann
changed the title
Huge slowdown when moving mouse over large HeightmapCollider, even when not pickable
Huge slowdown when raycasting large HeightmapCollider
Dec 16, 2018
Tagging the resident Bullet wizard @AndreaCatania |
This was referenced Dec 21, 2018
Reopening as #25543 was reverted. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Godot 3.0.6
Godot 3.1 alpha3
This is a very weird one found by Zylann/godot_heightmap_plugin#57
My terrain plugin uses
PhysicsServer
to build a Bullet HeightmapShape of size 2049x2049, and apparently moving the mouse over it causes a massive slowdown, to 1 fps or lower, even when the shape is set to not be pickable. This makes collision on terrains completely unusable.It should also be noted that my plugin creates this collider also in the editor, but for some reason, it doesn't cause any slowdown there. Also, I tested collisions just fine in a 513x513 terrain this morning, but perhaps it was small enough to not be noticed?
I made a minimal project showing the issue:
HeightmapColliderSlowdown.zip
It just creates a completely flat HeightmapShape with the origin corner centered at the world origin, and an AABB spanning -1 to 1 in height (so it definitely encloses the heights).
It also reproduces in Godot 3.1 alpha3, but only if actually set to be pickable:
HeightmapColliderSlowdown31.zip
Play the main scene, and look at the console printing every frame.
Move the mouse above the area with a plane mesh: notice the massive slowdown.
Edit: just in case, I tested with power of two sizes: 2048 has no effect, and 1024 only halves the slowdown, but we are talking about 1 -> 2 fps here.
The text was updated successfully, but these errors were encountered: