Should’ve asked how to make a part vanish when touched! I’m not sure if I can help in the most efficient way because I’m not great with parts, but I do have a script that can make a part explode when it’s touched, if that helps.
`local` `delayTime ` `=` `3` `-- How long (in seconds) to wait after an explosion.`
`02` `local` `currentlyDelaying ` `=` `false` `-- Don't touch this.`
`03` `script.Parent.Touched:connect(` `function` `(hit)`
`04` ` ` `if` `currentlyDelaying ` `=` `=` `false` `then`
`05` ` ` `local` `exp ` `=` `Instance.new(` `"Explosion"` `, script.Parent)`
`06` ` ` `exp.BlastPressure ` `=` `500000` `-- The pressure of the explosion`
`07` ` ` `exp.BlastRadius ` `=` `4` `-- The radius of the explosion`
`08` ` ` `exp.DestroyJointRadiusPercent ` `=` `1` `-- The radius of where joints are destroyed upon impact`
`09` ` ` `exp.ExplosionType ` `=` `Enum.ExplosionType.Craters ` `-- What type of explosion do you want? Craters, CratersAndDebris, or NoCraters.`
`10` ` ` `exp.Position ` `=` `script.Parent.Position ` `-- The position of the explosion`
`11` ` ` `exp.Visible ` `=` `true` `-- If the explosion can be seen`
`12` ` ` `currentlyDelaying ` `=` `true` `-- Sets currentlyDelaying to true so that the code will be ignored`
`13` ` ` `wait(delayTime) ` `-- Waits the delay time.`
`14` ` ` `currentlyDelaying ` `=` `false` `-- Sets currentlyDelaying to false so that the code will no longer be ignored.`
`15` ` ` `end`
`16` `end` `)`
Unions won’t work to well you can try it since roblox does constantly improve there union operations but for the best results you should do some math and divide the parts
I am afraid this is not it either, as, the explosion instance, in order to create such an effect, would need multiple parts to make them launch, unless you are suggesting I make the map with a huge ammount of bricks, which is one of my options. I meant, however, not to launch parts, but instead to partially delete them in order to make it seem “dug”. Something around the lines of creating a crater.
I see. I’m afraid I won’t be able to assist you then, please accept my sincere apologies & hopefully you’ll find the guidance you are looking for! Blessed be!
When I mentioned unions I was refering to using simpler shapes. So, instead of using a sphere, for example, I would use something like a uniform polyhedron. Something around the lines of this:
Not to sure, I’d imagine it will since it has to create less triangles, the problem with unions in general is that they have terrible hit collision and have a pretty decent high chance to fail, although when I messed with unions it was a few years ago; I know roblox made many improvements to real time union operations recently, it gets expotenitally more expensive if ur unionining a union aswell
If the explosions are somewhat consistent, you can have a set of varying explosion hole meshes. The sizes aren’t important as they can be stretched, squashed, and resized depending on explosion power. Then you need to do some annoying math to get it fit into the part surface. This is basically done by building 4 parts around it.
After that though, you get destruction holes without the annoyances of CSG performance and other conflicting issues like possible jank collisions.
Added benefit of course is that textures will still work on it along with materials as long as it’s properly uv wrapped.
You should look into Mesh Deformation. Skinned MeshParts are live!
This would be so you could have a Mesh block, then deform it when a hit is detected.
I am trying to make a hole or a dug out sphere in a part. Doing this with unions is pretty easy - the only problem is that it causes a lot of problems in the long run. With an abundance of unions and with attempts at unioning and union multiple times, performance becomes an issue. I am not sure if, somehow, I can ease these problems?
Your correct that if you union with balls and cylinders then its a lot slower and if you keep unioning the same parts over and over can also get over complicated and slow the union operation
I am not sure as to what I want honestly. Lately I have been feeling like Terrain is slightly restricting in other departments aside from destruction. Right now, I am exploring a bunch of options to stick to what is better.
Scripting terrain is obviously easier. I am only slightly conflicted in terms of style, but I am trying to figure that out.
That plugin is really cool. Can you somehow script on it?
Is it possible to script mesh deformation?
Voxel based is what I am trying to experiment with at the moment. I am having a bit of a hard time but progress is being made!