Chapter 6. Input and Collision

This chapter covers recipes surrounding game control input (keyboard, mouse, and gamepad), and collisions with obstacles.

The following recipes will be covered in this chapter:

  • Axis Mappings – keyboard, mouse, and gamepad directional input for an FPS character
  • Axis Mappings – normalized input
  • Action Mappings – one-button responses for an FPS character
  • Adding Axis and Action Mappings from C++
  • Mouse UI input handling
  • UMG keyboard UI shortcut keys
  • Collision – letting objects pass through one another using Ignore
  • Collision – picking up objects using Overlap
  • Collision – preventing interpenetration using Block

Introduction

Good input controls are extremely important in your game. Providing all of keyboard, mouse, and especially gamepad input is going to make your game much more palatable to users.

Tip

Introduction You can use Xbox 360 and PlayStation controllers on your Windows PC—they have USB input. Check your local electronics shops for USB game controllers in order to find some good ones. You can also use a wireless controller with a game controller wireless receiver adapter connected to your PC.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.58.190.38