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 ...

Get Unreal Engine 4 Scripting with C++ Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.