# How to create a JU Character / Reskin Default Character / Setup New Characters

## Creating a JU Character

1 - Add the [Humanoid Character](https://docs.unity3d.com/Manual/UsingHumanoidChars.html) model in scene

2 - Click on Create > JU TPS Create > Quick Setup > Player&#x20;

<figure><img src="https://2945806600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCQMDx0LmgnRXXTklLhoh%2Fuploads%2FPSxWQxDju1OYhVU6hKfc%2Fimage.png?alt=media&#x26;token=e59e2b30-729d-4ec9-a314-d6dec8f28ece" alt=""><figcaption></figcaption></figure>

3 - Choose the best option for your game

| Controller Setup Option | Description                                                                                                                                                                    |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Advanced TPS            | Add complementary components: Foot Placement, Footstep, Body Lean, Drive Vehicles, Procedural Driving Animation, Ragdoll Controller                                            |
| Simple TPS              | Simple setup, only JU Controller and Footstep                                                                                                                                  |
| 2.5D Sidescroller       | 2.5D Sidescroller Game setup (it is necessary to use a [Sidescroller Camera](https://julhiecio.gitbook.io/ju-tps-documentation/game-development/game-styles) to work normally) |
| TopDown                 | TopDown games setup (it is necessary to use a [Top Down Camera](https://julhiecio.gitbook.io/ju-tps-documentation/game-development/game-styles))                               |

<figure><img src="https://2945806600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCQMDx0LmgnRXXTklLhoh%2Fuploads%2FHbegFS7Jr1LTBVzxyXMx%2FAdvancedCharacterSetup.gif?alt=media&#x26;token=d14b9401-287e-4f4e-b25d-4800aaf49396" alt=""><figcaption><p>You now have a functional JU Character 😎👍</p></figcaption></figure>

{% hint style="info" %}
Note that you can add or remove components in any setup and configure it according to your project needs.
{% endhint %}

## Configuring the JU Character Controller

### Locomotion Settings

<div align="left"><figure><img src="https://2945806600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCQMDx0LmgnRXXTklLhoh%2Fuploads%2FtoaxFlmQTSfmflxE7aq4%2Fimage.png?alt=media&#x26;token=f190ed2b-c5f7-4cc9-ad1c-b848906a26b5" alt=""><figcaption></figcaption></figure></div>

Locomotion Mode has three types of locomotion:

{% tabs %}
{% tab title="Free " %}
Default Locomotion, beautiful.
{% endtab %}

{% tab title="Aways In Fire Mode" %}
Always looking forward and in Fire Mode/Attack Mode, is used in [FPS style](https://julhiecio.gitbook.io/ju-tps-documentation/game-development/game-styles/first-person-shooter-style)
{% endtab %}

{% tab title="JU TPS Classic" %}
Free movement when unarmed and always in Fire Mode/Attack mode when selecting a weapon
{% endtab %}
{% endtabs %}

| Locomotion Options                   | Description                                                                                                                                                                                            |
| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Use Default Inputs                   | Uses standard control buttons                                                                                                                                                                          |
| Set Rigidbody Velocity               | Move character by physics, if this is off the movement will not affect the rigidbody physics.                                                                                                          |
| General Speed                        | General speed                                                                                                                                                                                          |
| Walk Speed                           | Walking speed                                                                                                                                                                                          |
| Crouch Speed                         | Crouched speed                                                                                                                                                                                         |
| Run Speed                            | Running speed                                                                                                                                                                                          |
| Sprint Max Speed                     | Maximum speed achievable in sprinting                                                                                                                                                                  |
| Rotation Speed                       | Rotation speed                                                                                                                                                                                         |
| Jump Force                           | Jump force/heigh                                                                                                                                                                                       |
| Air Control Force                    | Strength that the character can move in the air                                                                                                                                                        |
| Stopping Speed                       | Locomotion stopping speed                                                                                                                                                                              |
| Max Walkable Angle                   | <p>Angles greater than this will cause the character slide. </p><p><mark style="color:yellow;">⚠ <strong>Leave it at 0 if you use Gravity Switch system</strong></mark></p>                            |
| Movement Affects Weapon Accuracy     | On moving affects weapon accuracy                                                                                                                                                                      |
| High Inclines Slow Down              | <p>High inclines slow down speed </p><p><mark style="color:yellow;">⚠ <strong>Leave it off if you use Gravity Switch system</strong></mark></p>                                                        |
| Curved Movement                      | <p>Moves the character according to the current direction and not the desired direction </p><p><mark style="color:yellow;">⚠ <strong>Leave it off if you use Gravity Switch system</strong></mark></p> |
| Lerp Rotation                        | Smooth rotation                                                                                                                                                                                        |
| Body Lean                            | The body leans in curves                                                                                                                                                                               |
| Root Motion                          | <p>Animation controls movement </p><p><mark style="color:yellow;">⚠</mark> <mark style="color:yellow;"><strong>Leave it off if you use Gravity Switch system</strong></mark></p>                       |
| Auto Run                             | Automatically run                                                                                                                                                                                      |
| \[Auto Run] Walk On Run Button       | Stop running when pressing the run button if it is already running automatically.                                                                                                                      |
| \[Auto Run] Sprint On Run Button     | When pressed the run button, it will sprint if it is already running automatically.                                                                                                                    |
| Enable Sprint                        | Enable sprinting                                                                                                                                                                                       |
| \[Enable Sprint] Sprint Acceleration | Sprint acceleration                                                                                                                                                                                    |
| \[Enable Sprint] Sprint Deceleration | Sprint deceleration                                                                                                                                                                                    |
| Decrease Speed on Jump               | The character slows down when landing from a jump                                                                                                                                                      |
|                                      |                                                                                                                                                                                                        |

### Item Equiping

Here you can write the ID number of the item you want to equip when starting the scene.

### Ground Check

| Ground Check Options | Description                                      |
| -------------------- | ------------------------------------------------ |
| Ground Layer         | Layers that Ground Checker will detect as ground |

The other options are basically this:

<figure><img src="https://2945806600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCQMDx0LmgnRXXTklLhoh%2Fuploads%2FGAl6ssq9Wpqh21Q42dk0%2FGround%20Check%20Settings.gif?alt=media&#x26;token=5585c7c5-fbf2-40eb-83cd-2666c56f0388" alt=""><figcaption></figcaption></figure>

### Auto Step Up

Auto Step Up is a system that makes the JU Character Controller go up stairs, similar to the "Step Offset" of the default Character Controller, but with more options.

| Auto Step Up Options           | Description                                                                                                                                                      |
| ------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Step Correction                | Enable Step Up System                                                                                                                                            |
| Up Step Speed                  | Movement speed                                                                                                                                                   |
| Step Correction Layer          | Allowed layers to do step up move                                                                                                                                |
| Step Raycast Distance          | Length of sensor ray from ground                                                                                                                                 |
| Forward Offset                 | Forward sensor ray position adjustment                                                                                                                           |
| Step Height                    | Minimum step height to step up                                                                                                                                   |
| Enable Ungrounded Step Up      | Makes the character reach wall edges more easily, also prevents flickering on wall edges                                                                         |
| UngroundedStepUp Speed         | Speed                                                                                                                                                            |
| UngroundedStepUp RayDistance   | Ray distance (this uses **Step Raycast Distance** as origin)                                                                                                     |
| Stopping Time on Step Position | You can set a duration so that when your character reaches a wall edge, the character stops moving for an instant, this makes it easier to stay on top of a wall |

<figure><img src="https://2945806600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCQMDx0LmgnRXXTklLhoh%2Fuploads%2F8xNs96lo5TVF8ZPanXjm%2FAuto%20Step%20Up%20Settings.gif?alt=media&#x26;token=80165dda-e559-4afe-b477-861f2d14d4a7" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
It is not recommended to leave the **Forward Offset** value less than the **Radius** of the **Capsule Collider** or the Auto Step Up may not work correctly.
{% endhint %}

### Fire Mode

***Fire Mode*** is the way the character is prepared to attack, the camera is closer, the character looks forward and wields an item.

| Fire Mode Options        | Description                                                                                                                            |
| ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------- |
| Item Aim Rotation Center | It is Fire Mode's item rotation pivot and also handles wielding positions.                                                             |
| Upper Chest Bone         | Upper Chest Bone                                                                                                                       |
| Aim Mode                 | This variable will define if you will have to hold the aim button or just press it once to aim                                         |
| FireMode Max Time        | The time it will stay in Fire Mode without interacting, but this option is only useful in [Free Locomotion mode](#locomotion-settings) |
| FireMode Walk Speed      | FireMode walking speed                                                                                                                 |
| FireMode Run Speed       | FireMode running speed                                                                                                                 |
| FireMode Crouch Speed    | FireMode crouched speed                                                                                                                |

{% hint style="info" %}
The "Upper Chest Bone" is assigned automatically when the game starts, if the system cannot find the last bone in your character's spine, assign it manually.
{% endhint %}

### Animator

If you want to create a custom animator or just edit the names of the Animator Controller parameters, this is where you'll edit.

<div align="left"><figure><img src="https://2945806600-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCQMDx0LmgnRXXTklLhoh%2Fuploads%2Fc3GwsMUqSZI9NUEcCdHp%2Fimage.png?alt=media&#x26;token=e7755c3e-626e-48bb-a35a-3c4256f0ed33" alt=""><figcaption></figcaption></figure></div>

### Default Events

These Unity Event options are very useful for calling functions and interacting with other GameObjects without the need for code.

| Event Options           | Description                                                                                                                                                                                                                              |
| ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Enable Ragdoll When Die | Enable ragdoll physics when character dies, [click here to learn how to setup Ragdoll](https://julhiecio.gitbook.io/ju-tps-documentation/quick-start/how-to-create-a-ju-character-reskin-default-character-setup-new-characters/ragdoll) |

| Events             | Description                                        |
| ------------------ | -------------------------------------------------- |
| On Death           | **Unity Event** called on death                    |
| On Ressurrect      | **Unity Event** called on ressurect/respawn        |
| On Run             | **Unity Event** called on start running            |
| On Sprinting       | **Unity Event** called on start sprinting          |
| On Roll            | **Unity Event** called on start rolling            |
| On Jump            | **Unity Event** called on jump                     |
| On Crouch          | **Unity Event** called on crouch                   |
| On Get Up          | **Unity Event** called on get up from crouch/prone |
| On Start Moving    | **Unity Event** called on start moving             |
| On Idle            | **Unity Event** called on stop moving              |
| On Enter Fire Mode | **Unity Event** called on enter Firing Mode        |
| On Exit Fire Mode  | **Unity Event** called on exit Firing Mode         |
| On Punch           | **Unity Event** called on start a punch            |

### Controller Options

These options are very important to define the JU Character

| Controller Options               | Description                                                                                                                                                  |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Block Vertical Input             | Block Vertical Input from locomotion, useful for sidescroller game type.                                                                                     |
| Block Horizontal Input           | Block Horizontal Input from locomotion.                                                                                                                      |
| Block FireMode On Cursor Visible | Block FireMode when mouse cursor is visible, useful to access menu/inventory and not shoot accidentally, on mobile it makes no difference.                   |
| Block FireMode On Punching       | <p>Block FireMode when character is punching.</p><p><mark style="color:yellow;">⚠ <strong>Leave this false if you are making a FPS Game.</strong></mark></p> |
| Enable Punch Attacks             | Enable punch attacks.                                                                                                                                        |
| Enable Roll                      | Enable roll.                                                                                                                                                 |
| Enable Physical Damage           | The character can dynamically take damage when impacting objects with Rigidbody, based on the mass and speed of the collided object.                         |
| Physical Damage Start At         | Minimum impact intensity to cause some damage.                                                                                                               |
| Physical Damage Multiplier       | Physical damage intensity.                                                                                                                                   |
| Ragdoll Start At                 | Minimum impact intensity for ragdolls.                                                                                                                       |
| Physical Damage Ignore Tags      | Tags that are exceptions, which will not cause damage through physical impact.                                                                               |
| Inverse Kinematics               | Enable IK (Inverse Kinematics)                                                                                                                               |
| Right Elbow Adjust Weight        | Right arm elbow IK weight                                                                                                                                    |
| Left Elbow Adjust Weight         | Left arm elbow IK weight                                                                                                                                     |
| Look At Body Weight              | Body IK weight in LookAt                                                                                                                                     |
| Head IK Weight                   | Head IK weight in LookAt                                                                                                                                     |

### Debug Options

These options are for viewing Gizmos that better guide you in configuring JU Character.

| Parameter          | Description                                                                                   |
| ------------------ | --------------------------------------------------------------------------------------------- |
| Only In Edit Mode  | Shows debug gizmos **only in edit mode**. Helps to keep the game view clean during play mode. |
| Step Up Correction | Toggles the visualization of the **Step Up Correction** gizmos.                               |
| Ground Check       | Toggles the visualization of the **Ground Check** gizmo.                                      |
| Gizmos Color       | Color used for the solid part of the gizmos in the scene view.                                |
| Wire Gizmos Color  | Color used for the gizmo wireframe/outline in the scene view.                                 |
