From the course: Unreal Essential Training (2019)

Physics simulation - Unreal Engine Tutorial

From the course: Unreal Essential Training (2019)

Start my 1-month free trial

Physics simulation

- [Instructor] Here's a short guide on how to set up actors in your scene to respond with realistic physics. Since we've already put code into the coffee cup, let's go ahead and make it physically interactive as well. The first thing to check is Player Collision. This mode only shows objects that will block or otherwise interact with the player. Eventually, it's a good idea to fill in all the gaps so that people don't walk through walls or fall through the floor but for our purposes, we're mainly interested in the desk objects, so let's head back to Lit mode. Now that we know that our mug won't fall through the floor, it's time for a little experiment. Now select the mug and head over to Details. Make sure it's Mobility is set to moveable. If it's static it's not going to get very far. Now scroll down a little bit further to the Physics section. When you click the dropdown here, you can see the full range of Physics interactions. All we need to do is enable Simulate Physics, but while we're here we might as well make sure gravity's enabled, unless zero-G is what you're going for. For basic interaction, that should do it. In fact, we can set up several assets with Physics at once. If you want to play around with this, again make sure that they're set to moveable. Head over to Play and go to Active Play Mode and make sure you're in Simulate. In this mode you can operate independently of a player, so you can move things around and see how they interact. I encourage you to dig in and experiment with the rest of these Physics settings. See what happens when you constrain something's movement in only one axis, or offset its center of mass. You're just scratching the surface of a sophisticated physical simulator. So get in there and defy the laws of reality.

Contents