Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
Working with physics opens up all kinds of neat possibilities in our game because we can have things collide, knock over, move, slide, roll, and even get into hinges and joints and chains. Once we've added physics on an object, we can get further into the properties of those physic materials. And what I'll do is import in my physic material package and get some materials on these towers, so they behave a little more realistically. Now the physic materials are different from materials that are on the object.
Right now, these towers have a different material on them. I'll select one and we can see in here, it's called white plaster. I'll take a sec and tune that up before I get into a physic material. I'll click on Diffuse and change the shader over to a Bumped Specular. This way, I can get a normal map in, and I'll roll up the rigid body for now, and open up that material. It's supposed to be white, and so there's not really a color texture with it. But there is a normal map that was also imported, and it's in the Textures folder.
I'll click Select in the normal map section, scroll down, and pick plaster N. It's a gently cracked and varied surface for that plaster, and so these are mapped and to show a little bit of variety as if they were molded. As a note, it's saying would you like to fix that normal map now? And I'll click Fix Now. It fixed it or so I think, but I'll make sure I go and check that in my Textures folder. In the Art Textures, there's plaster N. And yes, it is a normal map, created from a gray-scale and we're in good shape.
Now for the physic materials. I'll go into my standard assets, right-click, and choose Import Package. In the packages, I'll bring in my physic materials and there's a reason it's not physics. It's a naming convention from Unity. In our physic materials, we've got some by default, and we can always go to the Unity store and get more if we need. I'll use these to start out. I think wood will work nicely. I'll click Import and bring them all in and now I've got my physic materials. Going into those physic materials and selecting one shows us the properties.
Each physic material has a static and dynamic friction, a bounciness. And combinations, what happens with the frictions, is there a direction, and so on. What this lets us do for example is stack objects using the static friction, so they don't start off sliding off each other and then we can add in dynamic friction. For example, if things are made of rough wood and they need to fall down and skid to a stop, we can crank that up. I'll try it as it is at the moment and see how it looks. I'll pick my first tower and in the box collider, there's a material section.
What this is is not a standard material, it's a physic material and so I'll click on the Selection button, and go pick Wood for that particular one. I'll repeat it with my other towers again, adding wood in the physic material section in the box collider. I'll also put a material onto the floor, selecting the floor or the podium here. And in its box collider in the physic material, I'll add in wood as well. It's a wood floor and this will work fairly nicely for the outside too. I'll look again at the rigid body on these as well. Right now in their rigid body, when I open it up, I can see it's got a mass, a drag, is using gravity, and so on.
I'm going to bring up the mass a little bit. I'll put a mass of two in and see how it behaves. I'll make the smaller one 1.5, and the bigger one I'll try out at three. We can put some drag in as well, if they're skidding too much, but I'll leave it alone for the moment. Adding some friction to the floor should help and I'll play this one more time and see how it looks. That's a little better. I ran into the art, and it fell over and stacked. In fact, I think because of the geometry, and the art, and the friction, it's stacked a little too perfectly. I'll knock over this one, and they knock over nicely.
I like the way that's reacting. They're not sliding across the floor anymore, and the mass is really helping them fall over. I'll do one last bit of tuning here. I'm going to pick the small one and add a little bit more drag into it. I'll put the drag at 0.1. I'll also do this with the bigger ones, giving them just a touch of drag and that way they'll fall and skid a little bit, but not much. It's very easy to have floating objects, and so we want these things to come across as if they have a mass to them I've knocked over the art. I can also play with the floor, maybe even creating a duplicate of the wood material, renaming it and changing its parameters so it's a little bit smoother in the skid.
I like the way it's behaving, though because I've got these materials now, really falling and clunking correctly.
Get unlimited access to all courses for just $25/month.Become a member
107 Video lessons · 33106 Viewers
94 Video lessons · 22976 Viewers
78 Video lessons · 9327 Viewers
147 Video lessons · 3116 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.