Implosion/Black Hole effect?

Hey guys!

I have a very simple game that has some fun with a destructible object, physics, and slow motion. You can make it explode into tiny pieces, but I wanted to throw something else in there.

Is there some way to get a “Black Hole” effect that will try to suck all the little bits into one point, then explode them all out again?

I’d like to be able to hit a button (like R for example) and have all the parts in the area come in and explode after a short amount of time. I tried using a radial force component in my blueprint and setting the impulse and force strength values to a negative number, but that didn’t do anything.

Thanks!

Hi Hoopera,

I’ve put together a simple demo to show how to setup something like this.

Here is a link to the video.](Dropbox - Error)

In this example I made a destructible wall and attached that as a mesh component in my blueprint. I then made two radial force actors that I set to be deactivated on start.

32763f4370c53fad2ffcc056f22c02dad030617b.jpeg

In this image you can see how I’ve set up the blueprint so that it activates the radial force actor > delays a bit > then deactivates it before moving on to the next one.

The first radial force will pull in the destructible mesh then after the delay will activate the second one to cause the explosion you see.

Do take note that this example I was using this on a specific mesh inside my BP. However, you could just have the radial forces in the BP and with the same setup. That way it’s not just the specific mesh it’s affecting. It could affect other destrucibles that are around your scene.

If you have any questions feel free to ask. :slight_smile:

Tim

Hey Tim!

Thanks so much for your answer, it helps a lot!

I did have one question: What are the settings you used for the radial forces? As in the radius, impulse, etc.?

Nevermind, I got it! Just turned the values of radial force 1 to negative values.

Once again, thanks man! I really appreciate the help!

Yeah, not a problem!

If you have any questions feel free to ask anytime! :slight_smile:

Tim

If it’s not too much to ask, I have ran into another issue(s).

Firstly, I can’t have too many cubes on the screen at one time. The game is an Oculus Rift game, so the framerate needs to be 60-75 fps at all times. I’ve added the destroy function to my game blueprint, and made the target the cube. I also have a function set up to spawn more destructible cubes at a certain point, and I linked that outcome to the destroy function at a button press. It works, but let’s say we have the origin cube that starts when the game begins, and 2 spawned cubes. They all collide, and explode apart. If I press the destroy key, it destroys all the pieces of the origin cube, and the second spawned cube, but not the first spawned one.

QUICK EDIT: The slowdown in the video is a slowmotion effect I implemented, not the framerate dropping.

Here’s a little video showing what happens:

[video]https://dl.dropboxusercontent.com/u/87753814/Desktop%2007.31.2014%20-%2015.05.49.09.mp4[/video]

3c55158b3a68ea764863c686d1f07424b29180c6.png

I can’t figure out how to get the delete function to delete ALL of the destroyed cubes in the scene at once. Also, no matter how many times I press the destroy key, it won’t destroy the leftovers.

I have another question.

I’d also like to get a pause feature going, but only one that pauses everything BUT the player. So, the exploded cubes would freeze, and the player can freely move around them, then press a key to unpause, letting the cubes continue exploding like they were before, as if they hadn’t been stopped. I don’t really know where to start with this one honestly. I’m quite new to Unreal Engine (as in, I’ve only used it for a few months) and I’m only just now really getting into the nitty-gritty of it. Think you could give me a hand with this as well?

Thanks!

I’m not exactly sure how to go about setting that up for the Pause and keep the player moving. I’ve spend a little bit of time this morning playing with Time Dilation to get things to slow down and speed up (which is quite fun!!).

Tesla Dev has a short simple tutorial on YouTube to get you started with a smooth transition between normal speed and slowmo
and

Russ setup a good tutorial for having objects in slowmo while the character is moving at normal speed.

Take a look at these to get you started. Hopefully someone with some Blueprint wizardry will be able to pop in with a way to pause and still move. I will continue to look at this but not sure if it’s completely possible without going into C++ code for something.

As a side note with Time Dilation node: setting it to 0 will not stop time. Setting it as low as possible will, like 0.01, but it won’t completely stop.

With the spawning problem I’ll continue to look at that and see if I can get your clearer answer. There should be a way to do it, but it may require some toggling of things inside the BP to make it work.
I’m not 100% on this, but it may require having the destructible in its BP to have collision, visibility, and some other things disabled until you spawn it then toggle them on.

Give this stuff a shot and let me know how it goes! You’ve got a fairly fun project here! :smiley:

Tim