Currently, enemy objects get destroyed when they are defeated by the player. This ends up in performance drops cause of the garbage collection. A better way to handle this issue might be to instead have enemies ragdoll when defeated and add a little force in the direction the player is facing.
Currently, enemy objects get destroyed when they are defeated by the player. This ends up in performance drops cause of the garbage collection. A better way to handle this issue might be to instead have enemies ragdoll when defeated and add a little force in the direction the player is facing.