VoxBreaker | An OOP Voxel Destruction module

I did apply the velocity from the previous post ( i just forgot to mention it. sorry brah ) but i dont wanna rely on it too much since it could cause parts being destroyed from the other side if knockback wasnt processed correctly.

I do still use it but i am just looking for alternatives just in case there is another better way other than just player velocity

For now i found out that bodyvelocity forcefully makes players go through walls so i am currently use that as a solution but if you guys have any better alternatives

also this could be the cause of unnecessary models being created since i have it as a problem and is most likely one of the lags causing it

image

The excess models are a bug that I just noticed yesterday. Will be fixing that asap.

2 Likes

ok new solution

i made a global for the partcache that ill use inside the voxbreaker module so that a new one isnt made each time the module is required

then i do the lil thing where you destroy voxels on the server while sending them to the client and you just clone the voxels and handle them from there

this has caused me little to no lag from my personal experience

Wassup everyone,

So I stumbled across another module similar to this one, and I would like to know everyone’s opinion which one could be better?

1 Like

Big tip, if your making a ragdoll destruction like jujutsu shenanigans make a strength value that decreases per second so to prevent the player from ever falls continuously the strength value will decrease to 0 to prevent the player from ever falling too low ( or add a set value time for how long the ragdoll should last presumably shorter than previously timed )

( liek this exampel of no strength system )

2 Likes

Is there any reason to not just stop the hitbox?

yessy i am explaining ways to stop it if your planning to create a ragdoll system with destruction :exploding_head: :boom: ( so liek stopping the hitbox via player velocity and ground check or having it just stop from a timer )

So like even if the time of the ragdoll ended, it will still continue because there is some velocity left???

like that but you got it mixed, I would recommend prioritizing ragdoll time over velocity since if there is still velocity left for a certain amount of time the ragdoll should need to stand up

Keep us updated Barto! Have you fixed the problem yet?
Also If you are open to suggestions, would you be open to adding texture support in the future? (I.e. parts keep the texture when broken, and maintain it once voxelized)

1 Like

I am currently putting 100% of my time into a personal project, which will be nearly complete soon. I will resume updates to the module once I have some free time, which should be in a week or two. And the texture thing is already half implemented, its just bugged at the moment.

2 Likes

Roblox Teardown Time!​​​​​​​​​​​​​​​​​

Your module is outstanding. Would it be worth using greedy meshing to reduce the part count further after using the hitbox method?

Perhaps an optional parameter for that could be a future update.

1 Like

I’ve considered greedy meshing, and tried implementing it in a previous version of the module. But unfortunately, I’m not super familiar with greedy meshing algorithms, and the module I tried using didn’t seem to work at all. I’ll try to look into it in the future, and if anyone has any resources on greedy meshing that would help a bit.

Theoretically, if it did work, it may help with performance. It’s very likely I’ll have to make my own algorithm here, as I’ll have to avoid greedy meshing voxels created by hitboxes. And if I do get it working, along with part cache, then there could be some major improvements in performance.

It would be awesome if the GitHub repository could be created soon! :grinning:

how do you make the parts go like that?

By using the weldto function implemented inside the module itself to weld on the humanoidrootpart

1 Like

If its possible it may be best to specify the amount of collisions allowed through your mover mechanic, velocity itself can be unreliable because there are certain actions like dashing, falling, leaping etc. which increase velocity but you wouldn’t want a collision for.

I’d advise on using a counter to specify the amount of collisions you would want as to avoid complications. This also stops players from tunneling into large parts.

This is a voxel module I’ve made myself so I’m not sure a counter would work with your scripts.

2 Likes