Lumberyard
Tutorials

Basics of Motion

The Basics of Motion series of video tutorials are sequential. You are encouraged to watch them in order. The videos show you how to:

  • Work with input bindings.

  • Use input bindings to move your entity.

  • Enhance your entity movements with Script Canvas nodes and variables.

  • Use physics and its kinematic and impulse forces to move your entity.

Series Prerequisites

To perform the tasks described in this 5-part tutorial series, the following gems must be enabled in the Project Configurator:

  • Primitive Assets

  • PhysX

  • PhysX Debug

  • Script Canvas

  • Script Events

  • Script Canvas Diagnostic Library

For instructions about enabling these gems, see Enabling Gems.

Part 1 - Handling Input and Entity Movement

Learning Objectives

This Lumberyard Video Tutorial introduces you to input mapping. Learn how to create an input binding on the keyboard. You then learn how to set translation using Script Canvas on an entity to move it around the level.

Prerequisites

  • You must also enable the gems described in the Series Prerequisites section in this topic.

Tutorial Content

Part 2 - Using Linear Interpolation with the Lerp Node

Learning Objectives

This Lumberyard tutorial shows how to extend the way you move an entity in the previous tutorial by using the Linear Interpolation or LERP node in Script Canvas. You'll learn how by specifying a start position and a destination, the engine will procedurally generate the in-between points to smoothly guide your entity to its destination, creating a smooth sense of movement.

Prerequisites

  • You must also enable the gems described in the Series Prerequisites section in this topic.

Tutorial Content

Part 3 - Entity Acceleration and Deceleration in Script Canvas

Learning Objectives

This Lumberyard Video Tutorial shows how to extend the entity movement by using variables to store the current velocity. It then shows how to add it to the change in position to create a sense of acceleration and deceleration when moving your entity.

Prerequisites

  • You must also enable the gems described in the Series Prerequisites section in this topic.

Tutorial Content

Part 4 - Entity Rotation using the Mouse and Enable Kinematic Actors

Learning Objectives

This Lumberyard Video Tutorial demonstrates how to use set rotation on your entity by setting up an input mapping on your mouse to control the turning. It shows how to adjust the mouse sensitivity during turning. It also shows you how to enable the kinematic flag on the PhysX Rigid Body component to let NVIDIA PhysX handle collision interactions between your rigid body entities.

Prerequisites

  • You must also enable the gems described in the Series Prerequisites section in this topic.

Tutorial Content

Part 5 - NVIDIA PhysX Movement by using the Apply Linear Impulse Force Node

Learning Objectives

This Lumberyard Video Tutorial shows you a different way to move your entity by using the NVIDIA PhysX system. Instead of using set translation, you use the Apply Linear Impulse Node on your PhysX Rigid Body component in Script Canvas.

Prerequisites

  • You must also enable the gems described in the Series Prerequisites section in this topic.

Tutorial Content