All right now we're going to take a look at a little simulation that we're going to do with the rigid
body physics.
So we're going to have a wall of cubes with a wrecking ball crashing through it.
And then we're going to have Miley Cyrus on top of the wrecking ball.
I'm completely kidding.
So let's go ahead and do that minus the Miley Cyrus part and let's go back to our scene right here.
Let's delete the cube and the sphere hit delete.
And let's keep our floor.
Let's go ahead and place our cursor here.
Shift day and mash Taurus hitting GNC to bring it up above the plane.
Now hitting s and y to scale along the y axis.
I'm also going to scale it down all together with esky and then rotate it along the x axis by hitting
R X and that 90 to rotate it 90 degrees.
Awesome.
Now bringing it up above the floor.
I'm going to hit the End key and go over here because we can see that now the scaling has changed.
I'm just going to take control and apply the scaling so that setback to 1 because that can cause some
weird things and our simulation now going ahead and hitting shift d to copy it.
Yes I'm giving you permission to do that.
Go right ahead and then hit Zied to bring it up.
Hit our rotated along the Z-axis 90 degrees.
Now we want to make sure that it's not intersecting with our other object because if it is when we play
the animation it's going to create some really weird results over here and where it doesn't know how
to correspond with the rigid body physics.
And it will just either go crazy and shoot across your scene or not give you the results that you want.
Now hitting shift right mouse by an Slyke both of these Let's head shifty Z and bring it up and make
sure that these aren't intersecting either hitting shift or which will duplicate our last action or
last thing that we did.
Let's just copy it all the way up to there.
And that looks good.
All right.
Now selecting a ring on your chain.
Let's go ahead and add rigid body physics to it and change it from convex hall to mash.
Now selecting all these other rings with be left click and drag over them.
Let's select our last ring by shift.
Right clicking on it and then going over here to our panel.
And if it's not open just press the tiki go to physics and let's click copy from active to copy all
of these options onto this one right here.
Now if we hit all day you can see what we got.
Pretty cool.
Now let's go ahead and select this last ring right here.
And actually de-select dynamic so that when we hit all day the rest of these rings right here we'll
hang on this one and this one won't have any animation at all.
All right.
Awesome.
Now what we want to do is basically add in our Wrecking Ball selecting all these are going to bring
them up and now selecting the last ring hitting tab to go into Edit Mode shift s cursor to selected
to put our cursor in the middle here then shift a let's add a U.V. sphere in here.
Bring it down and scale it up to however big you want your wrecking ball to be.
So about this size right here.
All right awesome.
I'm actually going to scale it up a little bit more want to write here too about the size right here.
All right cool.
Now hitting tab to go back into object mode.
You can see if we go to front view one of the numpad and hit Alt A to play.
It's does not much at all so we want it to swing in order to make it swing.
Let's go ahead and select all of these right here and rotate it.
But we wanted to rotate around the top here.
So in order to do that let's left click to place our cursor up here and then change it from median point
to 3D cursor.
Now if I rotate it you can see what's happening.
And then if I hit Alt A and rewind my animation first of a you can see that there we go all a wasn't
working for some reason.
You can see that our ball is swinging around our space right here.
Pretty cool.
Now I want it to have a little bit more mass to it.
So selecting this ball or wrecking ball right here I'm going to go over here and select calculate mass
and I'm actually not sure what wrecking balls are made out of glass right.
They're made of glass or Elmina's like something that sounds heavy so I'm going to go ahead and go with
the brass right here.
Shift a holding Shift and left arrow.
Let's go back to the beginning and hit all day.
And now we can see what's happening.
That's pretty cool effect but that's not what we want to happen.
So you can see that now because the ball has a huge mass to it.
It's actually so heavy that it breaks our chain in order to fix this.
All we have to do is select all our links here.
Right click our ball as the last object and select copy from active so that all of these links have
the same mass to them as well.
Now if we hit all day and of course we have to select our last link here and make sure that we de-select
dynamic Alt A.
Now you can see that it won't break off and has a heavier flow and motion to it and it won't break because
the mass.
What it does is it adds more heaviness and weight to it.
But it also makes it stronger.
So the more mass the stronger it will be.
Of course if you have a chain were like for example around a dog and they're pulling it and they break
it off or you want it to break off you can put the mast down.
So now we have our wrecking ball.
Let's go ahead and add our wall of cubes the wall of cubes.
All right.
Let's go ahead and hit shift A and let's change this back to median point.
Not 3-D cursor hitting shift they add mesh cube G and Z to bring it up above the grid floor.
Let's scale it down and hit control a and apply the scale of it to bring it down to the floor over here
bring it back.
Actually want a little bit bigger so let's scale it up a little more.
And apply the scale once again with control a scale.
Let's go to modifiers have add a modifier and let's add an array modifier where you change the offsets
right here to the y axis.
So let's put it in one.
And one thing you want to make sure just like with the links you want to make sure that the cubes aren't
intersecting with one another.
Otherwise it's just going to explode and go crazy.
So you want a little bit of spacing here.
And the way we're going to do that is just increase this Llobet So one point zero to now we have a tiny
bit of spacing in there and that's fine and dandy let's increase this so that fills up our entire plane
and then let's go ahead and add another modifier array.
And let's put it on the z axis for this one.
So hitting 0 on that one.
And then on this last number we're going to put one point zero two as well and increase the amount to
however big you want your wallet to be.
Now let's bring it down.
All right so there's our wall.
Now what we want to do is apply the array modifiers go ahead and apply them and now we can see that
this is a single object.
So we want all of these cubes to be individual objects.
If we had to have to go into Edit Mode what we can do now is hitting the peak key you're given the option
to separate these out by three different options.
So we're going to select loose parts.
If you remember they're spacing in between each cube.
So if we hit P and loose parts it will actually make all of these cubes individual objects via the loose
parts of our previous mesh.
Pretty cool.
All right.
I'm going to select back all our cubes and now if we rewind our animation hit all of a and of course
first we have to add the rigid body physics to our cube.
Let's add rigid body and hit shift left arrow hit on a you can see that it's actually only added to
1.
We also have to do copy from active.
All right.
There we go.
Now all day you can see that we have a rather interesting result.
Now the reason that that's happening is because every single cube you can see that the origin or the
center of origin for the cube is on the bottom right corner for each and every single one of them.
And again the rigid body physics are based around the origin or the center origin of our cubes.
So we just need to reset them so that the origin is in the center of each cube individually.
Let's go ahead and select all our cubes.
We're going to move this light as well out of the way select all our cubes de-select the the plane by
hitting B and middle mouse clicking to de-select.
Now with all our cubes selected Let's hit Control shift all.
See I know that takes a lot of fingers to get all those keys down and then click origin to geometry.
Now we have all our origins in the center of our geometry and let's go ahead and play our animation
now and see what happens.
Lujah.
All right so that is pretty cool.
And that is the rigid body simulation.
And so here we just broke down a wall.
Now one quick thing that we could take a look at if we had all day to play.
You could see that playing kind of in a slowish motion.
So what we're going to do is actually go over here to the scene tab and increase the speed to two.
So now with the speed at two let's go ahead and play it.
You can see that swinging a lot faster and the cubes are moving much more.
We can also scale up our plane way high.
Hit control Ada apply the scale rewind our animation and we play it.
Now we can see that our cubes will actually interact with the floor and bounce off of the floor.
Pretty cool.
So there is a rigid body physics with the little simulation we did here with the wrecking ball.
We saw how we use a physics for a chain object and how the how the physics interact with one another.
Again if you want it to be passive meaning that it's it's a physics object but it won't move or be animated.
Meaning the object will interact with it such as our plane floor.
You could just like passive here but if you want them to be active such as everything else that's happening
here.
Make sure that they're active.
All right so let's take a look at one last thing in the next Tauriel with rigid body physics and then
we'll be done with this part of the course and tutorials.
All right I'll see you there.
All right for this little quote at the end of the video I took all the words the end and only made this
for you if you take what you've believed all along and keep beating the drum to the same old song you'll
keep running in circles all day long you'll know if it's not the correct way if it's wrong.
So you got to take a different path and be strong.
Ladies and gentlemen sometimes the path that we go down our whole life might not be the correct one.
So take a look what path you're going down right now and if it's wrong make the change.
Appreciate you guys have an amazing one.
I know you're doing awesome on this course.
I'll see you in the next tutorial.
Oh.
Take care.