Hello everybody and welcome to this reminder video it's been a while since we've had one of these.
Now when it comes to applying a transforms and physics it is incredibly important if we don't apply
our transforms to the physics engine will think something is smaller or larger or weighs more or less
than it should do compared to its volume.
So you end up adjusting the density of something without even realizing.
And obviously if you're trying to mimic brakes as we're going to do in this section then you're going
to end up with something not acting as you would expect it to.
So that is really important.
So let's learn a bit more about applying transforms and how they're going to affect you in physics by
hopping straight on over in a blender.
Okay so we're back over in blender and we have two things in front of us.
We've got three balls on each of these ramps these ramps are slightly downwards as you can see here
they do have a slope to them.
I've already set out the physics and will learn a lot more about that at the moment.
We just need to focus on what happens if we don't apply it transforms.
So the three balls on the left here and the ramp are a duplicate of these three balls on the right.
The only difference is they they always the same.
They all have the same friction and all the other set ups.
But the difference between these two the one on the left.
All of these have a scale factor of one.
Now these ones on the right have a slightly different scale factor rubbering.
Open the properties tab.
If I select the one on the right here we can see it's got a scale of point one.
This has a scale of one in the middle and then the one on the left has a scale of 10.
So they will behave slightly differently depending on what they are.
So in reality the one on the far left of this group of three is much smaller.
And on the right is much larger by a factor of 10 both ways.
So let's without any further do let's go ahead now and play the animation and see what happens.
So the balls dropped down a little bit of a bounce to them and we see and there will be some randomness
here that's just part of the physics engine itself.
But we see that these three balls are pretty much going at the same speed down this ramp.
And the smallest ball is going quicker than the medium ball.
And then this one's barely moving it.
I mean it is moving.
You know they dropped off the end there.
So this one here is slowly moving down but it's not behaving as you would expect it to.
And this is something that will throw you a lot.
When it comes to your animations especially if you're using the physics engine in it if you've not applied
the scale it's not going to act as you would expect it to.
And that could be obviously very annoying if you then go and tweak loader parameters and then realize
I only had remembered to apply my scale.
Now there are a couple of other things.
Sometimes if you inadvertently apply the wrong location you can get some really weird results as well.
And we had that warning in right back if you remember when we were doing the Skittles.
If you've got the centre of mass or the origin of the object in the wrong place you'll end up doing
weird things as well.
In this case the origin of all of these objects of course is in the middle of them so we stop it here
and let's go back to the normal default view that we'd have and we've got the origins right smack bang
in the middle of each of these balls which is where it should be.
That's where the centre of masses.
If we decided to have a bit of fun of course and move that centre of mass slightly to one edge that's
the centre of mass on top of this ball solona left click on the very top of the ball.
I've run out of zoom.
This happens so often you select it so we can zoom right in and put 3-d cursor on the top and in the
tool shelf itself under the Tools Options set the origin to the 3D cursor.
So now all of the mass of this ball is distributed on the very top.
And I'm going to do the same on this one but this time on its side and then we're just going to laugh
as it ends up Mexican being down the entire ramp this origins of 3-d cursor.
So let's see what happens if we go ahead and do that because we've moved where the masses and we can
see that these things are moving in a very weird way in fact I don't think the slope is big enough.
But they're tending to go towards where that weight is.
Perhaps I've been a bit too extreme on that mascara's distribution but there we go.
So in this case this would be a case of in here going apply the location and then see what happens after
that.
Oh it's gone really weird.
Now look at it go.
I wonder how those amazing So if we go ahead and inadvertently have plied the location that's move the
origin all the way over here.
I've seen that happen so many times.
So the origin is well back in the whole origin of the entire world at zero zero zero.
The ball of course is nowhere near that so often in these cases if you've inadvertently done that's
very easy to do you can go to set origin after the object is selected and move it to the centre of mass
either by the surface or in this case of unadilla volume.
And I can do the same here with this next one set origin to the centre of mass and we'll learn a lot
more about that in the next lecture.
But let's just make sure these are now going down as we would expect them to.
Yes they are working.
And let's just fix these here so we.
If I select this one here and apply the scale and on the end apply the scale as well.
Now we should see that they behave very much like each other.
Of course there will be some randomness but we can see they're all falling at an appropriate rate for
what they're doing and they should all reach the end pretty much together give or take a few frames
difference.
Perfect.
So I hope that's clear that things and specifically why you need to apply your transforms when it comes
to doing physics.
And I will see you all in that next lecture.