How can I remove instanced static meshes with an actor?

Hey all!

I am going to try my best to explain my situation I am having with a project I am developing. My goal is to create an environment that the player can manipulate as they wish, with the environment itself. The way how they do this is similar to minecraft. The player can remove blocks of the terrain, store it in their inventory and respawn the blocks somewhere else. I’ve made this possible by using a instanced mesh that spawns the environment using 100x100 blocks arranged into a platform. So to remove a block player makes a line trace, checks to see if its a instanced static mesh, then with a key press removes the block. Inventory system is a WIP but i have it so that with another key it spawns a block at the location of the trace.

Anyway I want to implement a system of destroying many blocks all at once like TNT you can place, set a fuse to and blown up a bunch of instanced static meshes. I’ve made the TNT to act perfectly as intended but i cant seem to figure out how when it explodes (btw it’s a beautiful destructible mesh with amazing shattering effects IMO) to remove the blocks(instanced Static Meshes) near its detonation.

Yes i’ve read a lot of the documentation and googled and examined tutorials relevant to the topic however I’m reaching out to the community to see if anyone has relevant knowledge they’d be willing to enlighten me on or could point me in a new direction of approaching this hurdle.

Thank you for your time in advance and I hope to hear from you soon.

I hope you know how to create an actor blueprint and add items to the scene. So to acheve your chalange you need:

  • Create an actor blueprint
  • Add in this blueprint a Static Mesh (your TNT)
  • Now add a triger capsule and scale it how big you want to simulate the item destruction
  • Then make the tnt to be interactive when you come and press E
  • Then after you call this event you need to make a delay (time to go away from explosion)
  • After delay done you need to see all destructible components that overlapped from the triger capsule and make them to destroy (if you want you can randomize the distructionby storing all static meshes in an array that make 1 other delay with a low timer like 0.01 and evry time delay counted to destroy randomly 1 of the item in the TNTs trigger box

Hey MK,

Thanks for a reply, however I don’t believe you read my post in it’s entirety, I’ve already made my TNT and my world is built solely with ‘instanced static meshes’ through an Actor BP. I can at the moment remove and place as i see fit but my issue is removing multiple ones at one or an alternative workaround. I appreciate you pointing me IN A DIRECTION but that direction has nothing to do with what I have setup ATM nor help answer my question.

To illustrate:

blocks removed

]

Blocks built

tnt placed

tnt activated enables physics and particle effects

tnt go boom

The reason i’m using instanced static meshes is to cut down rendering so I can incorporate physics dependent features.

Man, this direction just make you a knowelage foundation to undestand on how make what you want to do xD.
You already made your tnt ok, so what is the problem on ading on the actor you spawn in actor bp a trigger capsule to use to destroy meshes that collide with tnt? and in the moment when the tnt explode to call an event that just make a list of all other istanced meshes inside the tnt trigger box and after destroy them?

You need a “get overlapping instances” node as I do at my [Open World Kit][2]

1 Like

That i understand and appreciate the effort to help. I’m well aware of the power of the internet and how to seek knowledge but that’s not what the purpose of the UE4 AnswerHub is. No offense but you pretty much did a google search on my behalf and posted links directing me to seek the answers on my own while giving a rudimentary solution. The reason why we ask questions here is to seek answers from those who are knowledgeable about specifically topics, whereas in my case Instanced Static Meshes lol.

I realize and admit your suggestion is absolutely logical. What I’m asking is specifically how do I do that, in BPs. I know what has to be done it’s the execution that i’m having trouble with. As in the pathology to achieve the desired result. I understand the concept fine. Before I posted this question I BP’ed the TNT block to do essentially what we both concluded theoretically needed to be done. Due to the unique nature of Instanced Static Meshes (ISM) though the BPing part needs to reflect functionality utilizing ISMes. Which is unlike regular static meshes that i can spawn and destroy at will using the tools and concepts from the YouTube vids you directed me to. Which I did originally in my first prototype but due to inefficient resource management I had to switch to using ISM and found that they work so much better for what I’m trying to achieve. If you know personally anything about ISMes with regards to what my intended use is I would appreciate the help. If your going to copy and past a link to the general topic of ISMes, i’d rather you not. If the link has to do with removing ISMes, which is relevant to what i’m doing, that’d be acceptable.

1 Like

I apologize for having to put it this way but I’ve done my homework on the subject to best of my ability and I’m reaching out to the community for help based on experience. If it were the case otherwise Unreal could develop a bot to answer these questions in the manor which you just did, like other companies do when you get a customer service chat bot upon visiting their websites. I’m sure I speak for many others who seek help using the hub and get similar responses from those who honestly I believe don’t know anything relative to the question being asked.

1 Like

Inventory system is a WIP

This your words make me feel you buy a inventory system so you dont know how is build and how you can use it to expand functionality. In this case if you want to develop something usefull you need understand how this things was made. If you think that you can buy from marketplace all assets and make around them a game you make a mistake.

When I see that people had a problem in case of game developing is better to offer them a sourse to undestand this thinks becouse if someon make code for you, and you dont understand how is made you never become a professional developer and trasform a passion in success.

Really unprofessional to assume someone asking a question is incompetent. Also I don’t appreciate your misinterpretation of WIP as an invitation to put me down and belittle me. You posted an answer to to my question when it should have been a comment to my question. As per the Answerhub guidelines:

Give Back to the Community!
How Can I help?
We’ve all been just starting out or learning something new at one point and gotten stuck. Someone probably helped you get past those obstacles. Sharing your knowledge or expertise is a great way to give back.

Keep these guidelines in mind when posting:

Only post answers when answering the question.
Post comments when asking for more information or contributing your own experience or insight to the issue.
Use the “Reply” link when directly replying to someone else’s comment.

Hey Two-Faced,

Thank you so much for this, exactly what I was looking for. If you have the time to go a little more in depth on this I’d really appreciate it.

Thank you for this perfect solution!