The Character component controls the basic behavioral abilities of the character, such as movement, jumping, death, respawn, etc.
You can have up to 65 of characters in the world at the same time, and you will no longer be able to spawn characters after that number
| Property | Type | Description |
|---|---|---|
| Character UI | Character UI setting, which will active when this character is enabled. Tap to enter editing mode | |
| Facing Mode | Enum | Relationship between character orientation and camera: |
Move Direction: Towards the direction of movement, the most basic orientation pattern in Uni
Camera Direction: Towards the camera, typically used in first person and shooting modes
Fixed: Fixed orientation, dragging the screen and moving will not change the orientation of the character. It is generally used in side-scrolling games
This parameter only works when the charater is controlled by player | | Lock Axis X | Bool | Restrict the character's movement on the X axis.
You still can change the position by setting the Position in script
This parameter only works when the charater is controlled by player | | Lock Axis Y | Bool | Restrict the character's movement on the Y axis.
You still can change the position by setting the Position in script
This parameter only works when the charater is controlled by player | | Run Speed | Float | Maximum moving speed | | Jump Height | Float | Maximum jump height | | Jump Count | Int | The maximum number of consecutive jumps before landing on the ground | | Current Jump Count | Int | The current number of consecutive jumps
This parameter will reset to 0 as charater landing on the ground
This parameter is only visible in the script | | Is Running | Bool | Whether running (including walk and run).
This parameter is only visible in the script | | Character Rotation | Int | - The component of the character's world orientation in the direction of the Y axis
This parameter allows you to set the character orientation in the script
0 indicates the positive direction of the z-axis, and 90 indicates the positive direction of the x-axis
This parameter is only visible in the script | | Current Player | Player | The player currently controlling this character.
This parameter is only visible in the script | | Current Checkpoint | Vector3 | Current checkpoint.
This parameter is only visible in the script | | Prop | | The character's default Prop |
| Event | Description | Parameter |
|---|---|---|
| When character jumps | Triggered when the character successfully triggers the jumping behavior | None |
| When character falls on ground | Triggered when the character lands from the air | None |
| When character is killed | Triggered when the character dies | None |
| When character respawns | Triggered when the character is reborn | None |
| When character start moving | Triggered when the character starts moving | None |
| When character stop moving | Triggered when the character stops moving | None |
| Command | Description | Parameter |
|---|---|---|
| Move Forward | Move directly in front of the character | None |
| Move To Position | Move to the specified coordinates | 1. Position: (Vector3) the position of the moving target in the world coordinate system |
| Follow | Move with the target | 1. Object: (Object) The target to be followed |