Gameplay Guide
This article explains the usage ideas in common gameplay within the generic movement system. GMS includes several concise APIs that can help you quickly integrate with your gameplay logic.
Switching Movement Sets
You can design several different movement sets in your movement definitions, and change the character's control logic and animations by switching movement sets during gameplay.

GMS has built-in several common movement sets that cover basic character control needs. For traditional action/shooting games, you can:
- Default: Used when the character is standing.
- ADS: Used when the character is standing and holding the aim input.
- ADS_Crouched: Used when the character is crouching and holding the aim input.
- Guard: Used when the character is standing and equipped with a melee weapon while holding the defense input.
- Guard_Crouched: Used when the character is crouching and equipped with a melee weapon while holding the defense input.
Each movement set uses different movement controls and animations. When you equip different weapons, you only need to replace different movement definitions (with the same movement set tags but different movement set settings), and the upper logic does not need to change, allowing you to switch control settings and animation settings.
In programming terms: use movement set tags combined with different movement definitions to achieve polymorphism.
Analogous Examples
When you develop new movement modes, you can design new movement sets:
- Riding: You can design MovementSet.Riding and MovementSet.Riding_Aim, corresponding to the control logic and animations when the character is riding and when the character is aiming while riding.
- Climbing: You can design MovementSet.Climb and MovementSet.Climb_Aim, corresponding to the control logic and animations when the character is climbing and when aiming while climbing.
Associated Movement Definitions

In the demo, the character only uses simple key inputs to switch between different movement definitions. In real game development, you usually need to work with other systems.
Taking the weapon system as an example:
In the settings of each weapon, there should be a movement definition field to associate the weapon with its corresponding movement definition.
When the weapon is equipped, switch the current movement definition of the movement system component to the movement definition associated with the weapon.
For more complex situations, such as distinguishing between male and female characters, you can also add similar Male_MovementDefinition or Female_MovementDefinition to the weapon, and select the most suitable movement definition based on the character's gender when the weapon is activated.
Switching Movement States
Movement states refer to states such as walking, running, sprinting, etc.

In addition to manually setting different movement states, in GMS, you can also dynamically adjust different movement states based on the actual movement speed of the Actor (thus applying different control and animation settings under different movement states).
For example, for NPCs, by adjusting the external speed of the NPC, GMS will automatically match the control/animation settings that are closest to that speed.
note
The reason movement states use GameplayTags for identification is that certain characters may have more or fewer movement states in certain movement modes. By using GameplayTags, you can more easily add new movement states.
Switching Rotation Modes
In the game, you will also switch rotation modes. If a character enters aiming mode, you may want to switch its rotation mode to ViewDirection. This is the most common usage.

For example, in a combat system: if you lock onto a target, the rotation mode should switch to ViewMode; if you unlock a target, it should switch to VelocityMode.
For example, with ranged weapons: when you hold the right mouse button, your rotation mode should be set to ViewMode.
Character Orientation Control
GMS has its own rotation system, and the way the character rotates will depend on the different rotation modes, using different rotation settings in the movement control settings.
When the movement mode (LocomotionMode) is Grounded or InAir, if the rotation mode is VelocityDirection, the character will face the direction of Velocity; if the rotation mode is ViewDirection, the character will face the direction of ControlRotation.
For more information, please refer to Movement Control Settings.
AI Orientation Control
When you want to manually control the orientation of AI characters, you should set the character's rotation mode to ViewDirection and update the direction the character should face by setting ControlRotation.
You can also call the APIs starting with SetRotation on the GMS_CharacterMovementSystem component to directly control the character's rotation.
Switching Overlay Modes

Responding to Events
When you call different functions on the movement system component, corresponding events will be triggered, allowing you to respond to the results of the operations.

For example: when you switch from the aiming movement set (causing the character to enter walking state) back to the default movement set, you want the character to return to the jogging state. You can perform the following operations:

Other Available APIs
In GMS, all commonly used APIs are categorized with GMS as the prefix. You can type GMS in the ContextAction list in Blueprints to see all available APIs.
