VoxelDestruct | Voxelated destruction physics with greedy meshing, hitboxes, and more!

Why do you spawn effects on server :skull: its network expensive

1 Like

Ah, I never even thought about this, thanks for letting me know! Yes, remove the bind wrapper and the line to unbind it. Iā€™m not even sure why I added that? It must have served some purpose, but as far as I know it will work without it.

1 Like

Iā€™ve been trying to fix this bug for a while now, I believe it has something to do with the greedy mesher. The bug causes parts to protrude and also causes some parts to be erased which shouldnā€™t be happening. I havenā€™t been able to fix this by myself, if anyone knows anything about this feel free to throw some ideas around.

1 Like

Yeah itā€™s working great now, thank you!

how can i get the debris parts if i wanted to add something to them, i havent seen anything of this topic in the thread unless i missed it

If youā€™re using .destroy(), calling the method returns a table of debris and then a table of wall parts. If youā€™re using .hitbox() youā€™ll need to use the hitbox events .Stopped and .Collision. These methods returns a table of debris and a table of wall parts too except .Collision will return debris for that collision and .Stopped will return all the debris from the hitbox when its stopped. Keep in mind if you are removing debris or destroying them or returning them to cache you may end up with some nil data in your debris table, just make sure to check that the debris in the table are not nil. Remember to use the .cleanup method on debris instead of destroying them since they need to be returned to cache. Hope this helps!

1 Like

Soā€¦ Iā€™ve been having this strange issue with the module where for some unknown reason, occasionally, both :destroy() and :hitbox() cause a massive lagspike followed by creation of several hundred, up to thousands of segments of walls,

RobloxStudioBeta_B3SuBHlIcJ

RobloxStudioBeta_Oo4Zi6jiX9

RobloxStudioBeta_AqcTksAInm
^the amount of BreakablePieces spawned after using the .hitbox() function

the amount can range from 1000 to 20000+ depending on the occasion

for weeks and weeks now Iā€™ve been trying to figure out what could be the cause of this but I canā€™t seem to get a solid grasp on it, any ideas?

Thanks for letting me know!

This is one of the bugs I havenā€™t had time to fix, thereā€™s an issue with the meshing that I havenā€™t sorted out, Iā€™ll try to have fix it soon.

Apologies for the inconvenience.

@WindBrine, I published a new version resolving a merge bug. Try using this version and let me know if the problem persists. I am curious to know why wall parts in the image have instances underneath them- this wasnā€™t an intended result.

If the issue persists, may you please provide your code and let me know what instances are children of your wall partā€™s. Thanks!

1 Like

i recommend using this rather than PartCache since it has lesser script activities

The instances underneath the wall parts are the segmented parts I believe which are created during the destruction process

ok after thorough testing for an extender period of time it seems like the lag issue iā€™ve spoken of is gone, thank you.

hey, in your opinion would you say this is a better alternative to voxbreaker, performance wise etc

Is there any uncopylocked testing places for this module, or a how-to video? I think that would be helpful for beginners such as myself.

I can make a how-to right after I release the next update, thatā€™s a nice suggestion! For now, read the documentation and the example code and let me know if you have any questions.

1 Like

Sent you a PM, wondering if you can help me out. All good if not.