🏇MRider
Las Update: Version 4.4.5
Last updated
Was this helpful?
Las Update: Version 4.4.5
Last updated
Was this helpful?
Was this helpful?
This component manages the Riding Logic of the humanoid character
The component uses a specific Animator Layer that has all the animations needed to synchronize the Rider and Horse Animations. This is solved by using the button [Add Mount Layer]
When the character interacts with any Mount Trigger it will notify the Rider component that an Animal can be mounted, and it will execute all the Mount Logic to mount the animal.
If enabled, the Rider will already be mounted on the Stored Mount.
Reference to an animal that can be mounted (That has the Mount Component). This feature is used in conjunction with the Start Mounted option.
It is also used with the Call animal feature. When using the method CallAnimal.. it will use the reference of the stored mount.
Extra Mount conditions to check if Mounting an animal can be executed (Condition Dynamic Target: The Mount)
E.g., The Rider is not allowed to mount if it's climbing a ladder or if it's inside any zone.
Extra Dismount conditions to check if dismounting an animal can be executed (Condition Dynamic Target: The Mount)
When mounting the Animal, the rider will be parent to the Mount -> MountPoint transform.
If Parent to mount is false. Use instead any Unity Cycle to Reposition and Orient the Rider to the Mount point when the rider is not parented to the horse.
Changes what Dismount animations will be used.
Random - It will use a random Mount Trigger of the Mount
Mount Input - Use the Rider Input Horizontal or Vertical to Dismount the animal. E.g., if you press Left while dismounting, it will dismount on the Left side
Last - Use for dismounting, the same Mount Trigger used for mounting
Rider Input -? it was the same as Mount Input (Removed)
Gravity Direction. This is used to properly orient the Rider back to the ground's Normal direction when dismounting. E.g., when the Animal is on a Slope or when the gravity direction has changed.
Kinematic Rider
When the Rider is mounting the animal. The rigidbody will be set as kinematic, which will avoid the Rider collider from pushing the horse's colliders.
Reference to the rider's main collider
Changes properties of the Main Capsule collider, so it can be adjusted better when mounting
Store all the internal colliders the character may have, like colliders in the spine and the head. This is used internally to avoid issues with unwanted collider behaviors.
Tip: You can right-click on the List to find the internal colliders automatically
Reference for the hands transforms. This is used to parent the Reins onto the respective hands
Offset to position the Rein points correctly on the Rider's Hands
These exposed values can be used with scriptable variables, so they can be accessed anywhere
The rider can mount an animal
The rider can dismount an animal
The rider can call a mount
All these parameters are related to calling a horse from afar. The horse must have an AI component
Layer to find the ground and teleport the horse when it is too far away
When the horse is in a distance farther away from this value, then it will be teleported back near the rider
When the animal is teleported, it will be at a distance (this value) near the rider
Ray Height to find obstacles when casting a ray down to avoid teleporting the horse inside any obstacle
Reference for the call animal audio clip
Reference for the stop animal audio clip
Audio Source
Reference for the source component to play Call or Stop animal sounds
Use it to disable components that are interfering with the riding logic.
Add the scripts that interfere with the logic while riding. (is usually used for scripts that are not supposed to be active while the character is riding. Like scripts that move and rotate the character, Ragdoll scripts, etc. Also, they are used to disable Inputs that are only supposed to be active when the character is not riding: E.g.: a Crouch Input.
Invoked when the Rider starts mounting the animal
Invoked when the Rider starts mounting the animal
Invoked when the Rider starts mounting the animal
Invoked when the Rider starts mounting the animal
Invoked when the Rider can mount an animal (when is inside any Mount Triggers)
Invoked when the Rider can start dismounting an animal.
Invoked when the Rider has found a Mount. When a value is stored in the value StoredMount
Invoked when the Rider can call a mount.
Reference for the Animator component
Reference for the Rigid body component
Reference for the Rider Root GameObject
Enables the re-synchronization feature
Sync the Modes from the Rider in case the Ride is using Animal Controller. Sync (Attacks, Damage)
If the Mount and the Rider have a difference on the Animator greater than this value, it will force a resync
Time to Align to the Mount Trigger Position while is playing the Mount Animation
When the Editor is in Play Mode, it displays the values of internal private variables.