Controlling Characters
Characters are a cornerstone feature of Game Creator 2. The Local Player component extends this functionality by enabling multiple characters to be controlled simultaneously with different input devices.
Setup Guide
Follow these steps to create a multiplayer-ready character prefab:
-
Create a Character
- Right-click in the Hierarchy
- Select Game Creator → Characters → Character
-
Add Local Player Component
- Select the Character in the scene
- Click Add Component
- Select Game Creator → Characters → Local Player
-
Configure Movement
- In the Character's Kernel settings
- Change Directional Movement to Local Directional
-
Setup Input
- Assign your Input Action Asset to the Character
- Select your movement action
- Assign the same Input Action Asset to the Local Player's Actions field
-
Create Prefab
- Drag your configured Character GameObject into the Project window
- This creates a prefab ready for the Local Player Manager to spawn
Movement Action Configuration
The movement action must output a Vector2 value. For a properly configured example, install the Players Example from Game Creator's example collection.
Input Requirements
- Configure Vector2 actions for movement
- Set up appropriate control schemes (Keyboard, Gamepad)
- Ensure input actions are properly mapped
Example Asset
The Players Example includes a pre-configured Input Action Asset that you can use as a reference or starting point.
Common Issues
- Ensure the Input Action Asset is assigned to both the Character's movement unit and the Local Player component
- Verify the movement action is configured as Vector2
- Check that the Local Directional movement type is selected