I've written some code in DBP that switches between a high poly model and a low poly model depending on the distance of the model from the camera. All is working very nicely with one ugly hitch. Deleting the old model and loading the new one causes FPS to drop momentarily, and that of course gets increasingly worse the more models I add.
So, my question is, is there a more graceful method for changing one model for another? Perhaps some faster or more efficient way to load the model such that it doesn't cause the system to lag?
I've included the code I'm using to switch models on the Source button.
Thanks in advance for any suggestions =)
P.S. I'm using the vector3 method from the code snippets board to get the distance between the mobs and camera.
A Cloaking Robe of Elven-Kind hangs in my wardrobe behind
All those things that mother said were proper for a boy