🎮Malbers Input & MInput
Last updated
Last updated
This is the Input Source for all the animals and creatures. This will send the Inputs values to the Animal. When using the Animals for AI you don’t need to add this script since the AI will handle the Movement and other Logic
The Different between Malbers Input and MInput is that the last one does not have any Axis (Horizontal, Vertical and UpDown). MInput is used only when the Movement Axis are handled by an external component.
When Using the Riding System this component must be Disabled. Otherwise the animal will move as soon as you press any of the Inputs and we don’t want to start moving when the rider is NOT mounted.
These are Inputs from the Unity Input System (Horizontal and Vertical are created by default). Custom Advanced Third Person Controller(TPC) Uses their own Input values. You can easily change it here to match the inputs from those TPC.
This are the Inputs used to activate any logic you need from any Component. They use the iMalbersInputs
interface to communicate with the Animal Script. If you are using a custom input system just change the type to Input and use the same Input Value on the Unity Input System.
Is the little checkbox near the name. It will enable and disable the input.
Name of the Input. It is used on the States, and Modes to Identify who's the input that will activate their logic.
Type of the Field... which you can choose between "Key" or "Unity Input".
Value of the Input. If the Type is Key you can pick a Key Code. If the type is Input
Logic of the Input you want to use
Select an Input Field and you will access their Events and Properties This is the same for MInput and Malbers Input
The Input will Register 2 Events: On Input Pressed() and On Input Changed(boolean).
On Input Pressed: Is invoked every time the Key/Input is Pressed
On Input Changed: Invoke true when the Key/Input is Down and false when the Key/Input is released
The Input will Register 2 Events: On Input Down() and On Input Changed(boolean).
On Input Down: Is invoked when the Key/Input is Down
On Input Changed: Invoke true when the Key/Input is Down and false when the Key/Input is released.
The Input will Register 2 Events: On Input Up() and On Input Changed(boolean).
On Input Up: Is invoked when the Key/Input is Released
On Input Changed: Invoke true when the Key/Input is Down and false when the Key/Input is released.
Long Press Time: Time required to do the long Input/Key press.
The Input will Register 4 Events:
On Long Press: Is invoked the Long Press time ends.
On Pressed Time Normalized: Invoke a normalized value from 0 to 1 every frame the Key/Input is pressed during the Long Press Time.
On Pressed Down: Is invoked when the Key/Input is Down the first time.
On Pressed Interrupted: Is invoked when the Key/Input is released before the Long Press time ends
Double Tap time: Valid Time between the first input and the second input to be consider a Double Tap.
The Input will Register 2 Events: On First Tap() and On Double Tap().
On First Tap: Is invoked on the First Input/Key Down.
On Second Tap: Is invoked if the First Input/Key Down is pressed again withing the Double Tap Time value.
The input will register 3 events: On Input Toggle(), On Toggle On() and On Toggle Off()
On Input Toggle: Is invoked every-time the key is pressed. Switches between Toggle On/Off.
On Toggle On: Is invoked when the toggle is set to On.
On Toggle Off: Is invoked when the toggle is set to Off.
The Input will register 5 events: On Axis Value Changed, On Input Changed, On Input Pressed, On Input Down, On Input Up
On Axis Value Changed: is invoked when the axis value changes
On Input Changed: is Invoked when the input value has changed e.g. Invoke true when the Key/Input is Down and false when the Key/Input is released
On Input Pressed: is invoked every time the input is pressed
On Input Down: is invoked every time the input is pressed down
On Input Up: is invoked every time the input is released after being pressed down
Invoked when the component is Enabled.
Invoked when the component is Disabled.
Invoke the Vector3 value combined of the Horizontal, Vertical and UpDown Inputs.
If you are using Malber Input component, First change all the Input Type to Input:
Add all the necessary inputs to map your Gamepad on The Project settings.
Here's an image for reference for connecting a gamepad to the Old Input System
The value of the input must match on the project settings and the component
To be honest, when using multiple controllers I strongly recommend using Rewired It is the most stable and most used system for multiple controller types
The other alternative is the New Input System