The Jump with Button behavior will allow you to make any physics object jump using an on screen button. If there is no button in your scene, the behavior will automatically add a button to your Global UI layer (note, deleting the behavior will not remove the button from your scene). This behavior contains predefined properties to make the creation of certain games easier. It's perfect for platformers, and side scroller shooters.
The Jump with Button behavior offers a lot of properties to customize the feel of your game. Try modifying the properties so your game doesn't feel like a generic platformer. For more advanced and in-depth games, it is recommended to create your own jumping system using the other physics, or move behaviors.
This behavior will Trigger an event once when you press the jump button.
This is the button that will be used to make Object B jump. It will automatically select a button added to your Global UI layer. if there is none, one will be created automatically.
This is the object you want to make jump. By default the current object is selected, but you can tap the graphic to change it to any other object in your scene.
This is how much much jumping power your object will have. The greater the power, the higher the object will jump. Keep in mind other physics properties, like gravity will affect how high the object can jump. The default value is 15.
This is how many times your object can jump before landing on the ground. If you want your character to double jump set it to 2. The default value is 1.
The wall jump toggle will indicate whether your object can jump off walls or not. When it is on, your object can jump off a wall. By default this is off
This toggle is only available when Wall Jump is on. This will flip your object to the opposite direction after jumping off a wall. By default this is on when you toggle on Wall Jump.
This will prevent your object from rotating. This includes any rotation caused by other objects or physics in your scene. For example, you can turn this on to prevent your character from tipping over. By default this toggle is on.
When this toggle is on, your object will play an animation when the jump button is pressed. You must select an animation from the Custom Animations panel.
On the left panel you can select animation cycles to play when you press the jump button. For jumping there are two states, the initial jump, and a falling animation.
On the left Custom Animations panel, you can prioritize your jumps animations so it does not conflict with another playing animation. The animation system will play a cycle with a higher priority. So if another animation behavior is interrupting your jump animation, try increasing the priority.
Select a sound to play each time the jump button is pressed.
If you want to make a platform game like Mario, you can simply add this behavior to your player object, and it will automatically create a button on your Global UI layer, and make your character able to jump.