# Mount

## Overview

&#x20;This component makes an Animal or creature mountable or rideable. This component is the connection between the [**Rider**](https://malbersanimations.gitbook.io/animal-controller/riding/mrider) and the [**MAnimal** ](https://malbersanimations.gitbook.io/animal-controller/main-components/manimal-controller)components.

![](https://963537199-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lzhr1XSMzMqNXjRnNlb%2F-M-N9FyVvwG_1ypI36fM%2F-M-N9HwHUF7nI4mrE3w2%2Fimage.png?alt=media\&token=9046b74d-19b2-4fa3-9fc7-10bbe8241cd3)

## General

### Active

This option allows this [**Animal** ](https://malbersanimations.gitbook.io/animal-controller/main-components/manimal-controller)to be mountable. It will be disabled it in case the animal dies,  when there’s already a Rider riding the animal,  a wagon is destroyed or you can use it to temporarily block the Rider to ride the animal.

### Animal

Reference for the Animal component. This is filled automatically on Start in case this field is left empty.

### ID

ID of the Mount

{% hint style="info" %}
&#x20;0 Means is an Animal… 100 means is a Cart/Wagon/Carriage. This is used on the Animator to properly identify which Riding Idle animations to play on which Mount.
{% endhint %}

This allows the Rider’s Animator to choose the right animations when the rider is Riding the Mount using the **Stance** Animator Parameter. Eg It can be the *Riding Animal Idle* or the *Riding Wagon Idle*  animation.

### Instant Mount

Ignores all the Mounting and Dismounting Animations.

![](https://lh3.googleusercontent.com/BnFRwQAyjvrbqJ6W0TfTvC4QJvmZ6AagwaOyZiFcCmRs2aXVTDQi7AFDTWMScLrEmQ_9HjU7ytsALVIxeuRqKS_b9H0mYZDNvYF4u2rdAW-UQzIRgH3B_dczCGn0JCFmPWSQQZXm)

### **Mount Idle**

This is used to Identify the Default Idle Animation when the Rider is mounting the Horse when you Enable Instant Mount, so the Rider will instantly go to this animation.

## Links (Mount Points)

Links are extremely important for the Mount System, they are the transforms for the rider be on the right spot when mounting the Horse.&#x20;

![](https://963537199-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lzhr1XSMzMqNXjRnNlb%2F-M-N9FyVvwG_1ypI36fM%2F-M-NGI8b3pO1B8rFf69l%2Fimage.png?alt=media\&token=d19ed224-bd10-4dce-b503-fdfa7455dc36)

### Mount Point

Reference transform for the **Rider** to be child of when mountin&#x67;**.**

{% hint style="warning" %}
The **Mount Point** Parameter is **required**. all the others are Optional and used for IK purposes
{% endhint %}

### Left IK

Reference transform of the Left Foot for IK.

### Right IK

&#x20;Reference transform of the Right Foot for IK.

### Left Knee

&#x20;Reference transform of the Left Knee for IK.

### Right Knee

Reference transform of the Right Knee for IK.

![](https://lh3.googleusercontent.com/FnPCFtrSf7ARR5Tlfj5d20jtWcZyX6ZSe9s4KzgVKKZ_C66TUM4E3oiHf5q476v0NjWyNXjZe3WvxINzQgGzFDmFwEaKXoG5xyZrkd1BfXE4QPwIaI9zOEwpAPeSD1qLMpi9Ioio)

{% hint style="info" %}
You can use the Mount Point Prefab located on this path:

*Malbers Animations/Horse Animset Pro/Prefabs/MountPoints*

To Create new Mountable animals.
{% endhint %}

## **Custom Mount**

All Mount Animations are made for the horse. When using any other animal, most of the time the animations from the animal and the rider will not match properly. This section is for those custom mounts,  for other animals/creatures different from the horse.

![](https://963537199-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lzhr1XSMzMqNXjRnNlb%2F-M-NIV0nDaMo9Rj3qP7l%2F-M-NIhmnj1EezLCOtw1e%2Fimage.png?alt=media\&token=4b993cfe-d2d0-459c-a97a-beb52eb18b4f)

{% hint style="warning" %}
This should be **Enabled** for all other animals except the **Horse**.
{% endhint %}

### Straight Spine

Enabling this option the Rider will ignore the defaults spine rotation of the mount animations, allowing a better sync between the Rider and a custom Animal. Using this option the Spine will be always straight.

### Trans Ref

Transform used  for the Point Offset Calculation.&#x20;

### Point Offset

Creates a Local Point using the **Trans Ref** position to Aim the Rider's Spine using IK.

![](https://lh6.googleusercontent.com/ibFng9e9wgJmcsQ2m1dLnPy9eQinQk2Vh7GeyLNMSl_X6emOi28vM6KuGOVbV52CPAs-u_P65VvbT2lZnb1-Pb-v5OCYo4umCH7r_HmRYTuJxc4UMKyy__z96ihIf3xl5J9Eac69)

### **Smoothness**

Lerp value to switch between Straight Spine **On** and **Off**

### **Animator Speeds**

Changes the Speed on the Rider's Animator to Sync with the Animal Animator. The Original Riding Animations are meant for the Horse. Only change the Speeds for other creatures.&#x20;

The Speeds Multiplier List correspond to the animal[ **Speeds Sets**](https://malbersanimations.gitbook.io/animal-controller/main-components/manimal-controller/speeds#speed-set-list).. Mainly for the [**Locomotion** ](https://malbersanimations.gitbook.io/animal-controller/main-components/manimal-controller/states/locomotion)State.<br>

![](https://lh5.googleusercontent.com/hj5d2CCRcMIkwq-qD8zxaqZW69F914CCuiVMt_-3tSXfIW9wxhsbAqEJiaq1sbOIDR5AIgUwP5yoqVeIqBTzNSrsouCfW3fwxzol6PP8KAFpadzyg8qMIpV4nBlqrWkcpXBDFY-1)

{% hint style="success" %}
If the Animal is on the Trot Speed Modifier: the Rider will modify his Animator Speed to have the same time of the Animal Trot Animation.
{% endhint %}

At the moment the Speed multiplier must be change by brute force until you find a good match for syncing  the animations. Fortunately there’s a helpful way to guess the best value for the Speed Mult.

{% hint style="info" %}
Enable **Debug** on the [**Rider** ](https://malbersanimations.gitbook.io/animal-controller/riding/mrider)component  and 2 spheres gizmos (1 **red** and 1 **green**) will appear on the Head of the Rider to see if the Animal and Rider Animations are in Sync.
{% endhint %}

![](https://963537199-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lzhr1XSMzMqNXjRnNlb%2F-M-NIV0nDaMo9Rj3qP7l%2F-M-NNGev2cxetGM6NZ5o%2F5NMvgL5rRD.gif?alt=media\&token=02f0c982-5c7f-47fe-a4d2-c9079eec5865)

## **M/D States:**

Mount Dismount States: Allows the rider to Mount and Dismount when the animal is on an specific state (Idle, Locomotion, Jump.. etc.)<br>

![](https://963537199-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lzhr1XSMzMqNXjRnNlb%2F-M-NO1SmLe3B6XWVvcl0%2F-M-NO8YwusNNDdGu9LOS%2FUnity_C1DYI2Ke0M.png?alt=media\&token=0be464bd-b45a-4d3d-bfff-d7ee31e78451)

### **Mount Only/Mount Only States**

When enabled: the rider will only mount the Animal when is any of the states on the Mount Only State list.&#x20;

Eg: If we have just Idle, the Rider cannot mount the animal when is moving (Locomotion) or Swimming (Swim).

### **Dismount Only/Dismount  Only States**

When enabled:  the rider will only mount the Animal when is any of the states on the Dismount Only State list.&#x20;

Eg: If we have just Idle, the Rider cannot dismount the animal when is moving (Locomotion) or Swimming (Swim).

### **Force Dismount/Force Dismount States**

When enabled, the rider will be forced to dismount  when the Animal when is any of the states on the Force Dismount State list.&#x20;

{% hint style="info" %}
E.g.: If we have [**Death** ](https://malbersanimations.gitbook.io/animal-controller/main-components/manimal-controller/states/death)on the list, the Rider will automatically dismount when the animal dies.
{% endhint %}

![](https://lh6.googleusercontent.com/t6CdKaeHo60lasyeFPHCXDgDqVAHk_okpUn_H60u0XMF4wwP956qBSHRyqn0FiBYsICjIlbhQanh5cTsGdB8LX0I411LAFrWWPv4WDmZAbGTd-MkqRUja9iM2pmZB5DdfrZA_Prj)

## **Events**

![](https://963537199-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lzhr1XSMzMqNXjRnNlb%2F-M-NO1SmLe3B6XWVvcl0%2F-M-NQaaxWUqv3FC0iHw4%2Fimage.png?alt=media\&token=a5ced37d-b22a-46ec-8606-f48f0d2d9bf6)

### On Mounted

Invoke the event when the rider start to mount the animal. &#x20;

### On Dismounted

Invoke the event when the rider start to dismount the animal.

### On Can Be Mounted(Boolean)

On Dismounted: Invoked when the Mount has an Rider Nearby. By default it has 2 listeners set by default. Using the MEvents Rider Mount UI  to let the Mount Interface know that an animal can be mounted and enables the Mount Icon (The Press F to Mount)

## **Debug**

When the Editor is on Play Mode: It will show the Internal private variables values.

![](https://963537199-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Lzhr1XSMzMqNXjRnNlb%2F-M-NO1SmLe3B6XWVvcl0%2F-M-NQjFroq6f8CMD1t8S%2Fimage.png?alt=media\&token=3b0505ff-23e3-44a6-9ab2-758d74da5ea3)

<br>
