Overview
The Bike Input Provider is a component in the ArcadeBP_Pro namespace that handles input for controlling a bike in a Unity game. It supports both keyboard and mobile inputs, providing a flexible interface for players across different platforms.
Note : this script is also example to show how you can use and provide input to bike.
so you can also provide your custom input to the bike.
Key Features
- Supports both keyboard and mobile inputs
- Configurable key bindings for various bike controls
- Integration with UI buttons for mobile input
- Easy-to-use interface for providing input to the ArcadeBikeControllerPro
Input Configuration
The Bike Input Provider allows configuration of the following controls:
- Accelerate (KeyCode): The key to accelerate the bike. Default is KeyCode.W.
- Reverse (KeyCode): The key to reverse the bike. Default is KeyCode.S.
- HandBrake (KeyCode): The key to apply the hand brake. Default is KeyCode.Space.
- SteeringLeft (KeyCode): The key to steer the bike left. Default is KeyCode.A.
- SteeringRight (KeyCode): The key to steer the bike right. Default is KeyCode.D.
- Wheelie (KeyCode): The key to perform a wheelie. Default is KeyCode.LeftShift.
Mobile Input
For mobile platforms, the Bike Input Provider uses UI buttons. Each control action has a corresponding UI button:
- AccelerateButton : The Button to accelerate the bike.
- ReverseButton : The Button to reverse the bike.