McAwl / Explosional

MIT License
2 stars 0 forks source link

Fix performance during slo mo explosions #124

Open McAwl opened 2 years ago

McAwl commented 2 years ago

Problem seen using 4 players during slo mo explosions. Problem may be 4 viewports and all the mesh collisions etc. Maybe too many particles also.

How do you debug this in Godot? What is the problem?

Fix ideas:

  1. (Preferred): reduce the number of rigid bodies from exploding cars to largest only, say 10.
  2. Disable other viewports to focus on exploding player's vehicle only.
  3. Turn off smoke particles on exploding pieces.
McAwl commented 2 years ago

When you sent debug to show collisionshapes you can see all sorts of weird and huge shapes being created, some aligned with meshes created during vehicle explosions, some not. create_convex_collision doesn't seem to be working too well. A Godot bug?

McAwl commented 2 years ago

Solution is to build the exploded mesh collision shapes when the player is first added to the scene, but disable first.