Basic 2D character class. An example scene is in 'Samples\Starter Content\Scenes\Character 2D.scene'.
The character is created like other objects, the easiest way to do this is to drop it into the scene from the Resources Window.
In order to configure character control by a player, you need to configure the properties of the Game Mode object. This object is in the scene. The Object Controlled By Player property should point to the character.
Now by launching the Player App, you can control the character.
The character is customizable using properties and nested components. By default, the character contains a sprite, a physical body, a component for controlling the player, and artificial intelligence.
Using properties, you can turn on/off certain components of the character, for example, the ability to run. Having changed the sprite, you will need to change the values of the properties in the Animation group.
|Height||The height of the character.|
|Radius||The radius of the collision capsule.|
|Walk Up Height||The height to which the character can rise.|
|Position To Ground Height||The distance from the character position to the ground.|
|Mass||The mass of the character.|
|Max Slope Angle||The maximum angle of the surface on which the character can stand.|
|Eye Position||The position of the eyes relative to the position of the character.|
|Linear Damping On Ground Idle||The value of linear dumping when a character is standing on the ground.|
|Linear Damping On Ground Move||The value of linear dumping when a character is standing on the ground.|
|Linear Damping Fly||The value of linear dumping when a character is flying.|
|Walk Forward Max Speed||Maximum speed when walking forward.|
|Walk Force||Physical force applied to the body for walking.|
|Run Support||Can the character run.|
|Run Forward Max Speed||Maximum speed when running forward.|
|Run Force||Physical force applied to the body for running.|
|Fly Control Support||Can a character control himself in flight.|
|Fly Control Max Speed||Maximum speed of character control in flight.|
|Fly Control Force||Physical force applied to the body for flying.|
|Jump Support||Can the character jump.|
|Jump Speed||The vertical speed of a jump.|
|Animate||Whether to enable default animation method of the character.|
|Idle Animation||Animation of character at rest.|
|Walk Animation||Character walking animation.|
|Walk Animation Speed||The multiplier for playing the walking animation depending on the speed of the character.|
|Run Animation||Character running animation.|
|Run Animation Speed||The multiplier for playing the running animation depending on the speed of the character.|
|Fly Animation||Character flying animation.|
|Jump Animation||Character jumping animation.|
In order to create character types, it is not necessary to create a .character file. You can use the scene and the character created in it as a type. To do this, select the scene file in the Resources Window and click '+'. In the expanded list there will be scene objects that can be dragged and dropped into another scene.