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 moveable lights – flashlight, part 1


Now we have an understanding of how these lights work, but so far, they've all been static, non-moving. However, in certain instances, we may want the lighting to change while the game is going on. Let's do that by creating a moving light, in a similar manner to a flashlight!

Getting ready

Before we start working, we should have the NightScene level opened. This is provided in the Example Code folder for this chapter that you can get off of Packt's website.

The NightScene level

Note

This level is a quick example of a night environment with the lighting reduced significantly. For more information on creating a scene using lighting for night time, refer to https://docs.unrealengine.com/latest/INT/Resources/Showcases/RealisticRendering/NightScene/index.html.

How to do it…

To create a flashlight, perform the following steps:

  1. The first thing we will want to do is create a SpotLight to use as our flashlight. We can do that by right-clicking on the ground near...