Skip to content
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

Lag spike when creating collision shape for mesh instance #44090

Closed
Tracked by #45333
HiNice2MeetU opened this issue Dec 4, 2020 · 1 comment · Fixed by #48916
Closed
Tracked by #45333

Lag spike when creating collision shape for mesh instance #44090

HiNice2MeetU opened this issue Dec 4, 2020 · 1 comment · Fixed by #48916

Comments

@HiNice2MeetU
Copy link

HiNice2MeetU commented Dec 4, 2020

Godot version:
v3.2.3

OS/device including version:

Renderer: GLES3 Renderer,
OS: Ubuntu 20.04.1 LTS
Graphics: NVIDIA Corporation TU106 [GeForce RTX 2060 Rev. A]
Processor: AMD® Ryzen 7 2700x eight-core processor × 16

Using steam version of godot

Issue description:
When using the auto-created mesh instance thingy (the "mesh" button you get in the 3d tool bar) and selecting single convex it creates a 1-2 min freeze, then the environment proceeds to be SUPER laggy, especially when the mesh instance is slected

Steps to reproduce:

  1. Make an new scene with a rigid body as the scene root
  2. get a mesh instance
  3. Set radius to 0.05 and mid height to 0.1
  4. hit the mesh button
  5. Select single convex sibling

Minimal reproduction project:

minimal.zip

@pouleyKetchoupp
Copy link
Contributor

Reproduced in 3.2.3 and 3.2.4 beta 5.

The physics polygon created from a capsule mesh has 1950 points (from all the vertices), and the editor gets stuck for a while when creating the debug collision mesh.

Callstack:

 	QuickHull::build(const Vector<Vector3> & p_points, Geometry::MeshData & r_mesh) Line 251	C++
 	ConvexPolygonShape::get_debug_mesh_lines() Line 43	C++
 	Shape::get_debug_mesh() Line 67	C++
 	CollisionShape::_update_debug_shape() Line 243	C++
 	CollisionShape::_notification(int p_what) Line 96	C++
 	CollisionShape::_notificationv(int p_notification, bool p_reversed) Line 39	C++
 	Object::notification(int p_notification, bool p_reversed) Line 931	C++
 	Node::_propagate_enter_tree() Line 224	C++

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants