Book Image

Unreal Engine Game Development Cookbook

By : John P. Doran
Book Image

Unreal Engine Game Development Cookbook

By: John P. Doran

Overview of this book

Table of Contents (18 chapters)
Unreal Engine Game Development Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Adding life to static meshes


Though it is nice having a level with a lot of static meshes (this is by default), they don't move at all (hence, they are called static). Static meshes are used for efficiency's sake, but there comes a time where you want the player to be able to interact with those objects, such as moving crates or shooting at things.

Getting ready

This recipe assumes that you have the example project and the level I provided (MeshingAnExampleMap) opened.

How to do it…

With that in mind, let's learn how we can breathe some life into our static meshes:

  1. Select a static mesh inside your level, such as the SM_Chair object we have placed in the fireplace.

  2. Once selected, go to the Details tab and under Physics, check Simulate Physics.

  3. Once finished, go in and play the game.

At this point, if you run into the chair or shoot at the object, they will react correctly, according to physics.

Note

You may also want to make a static mesh movable for something such as moving platforms and the like...