Jump with Button | hyperPad Documentation
Logo
DocumentationInteractionJump with Button
Interaction

Jump with Button

Published February 19, 2017
Jump with Button

Art Studio learning guide

Description

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 (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.

_ Note: The bottom of the object must be touching a surface for the object to jump. E.g The characters feet need to be touching the ground for it to jump._

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.

Rigged Objects

This section describes the live-rig update and requires a build with Rigged Objects. A public release date has not been assigned. Existing sprite/object workflows remain supported.

Object A is the jump button; Object B is the character. Jump still moves the complete character's physics body.

Select Takeoff for the initial jump and Fall for falling in Custom Animations. Set both to Body Part → Legs, with Animation Priority at least as high as movement. Takeoff holds its final pose during physical ascent, Fall loops on descent, and landing releases the airborne animation. Select Fall explicitly. This adapts to different jump heights and landing times better than one complete fixed-duration Jump clip.

Use Shoot → Body Part → Upper Body to fire while jumping. Parent hip motion still carries the torso; Body Parts do not detach limbs or create separate collision shapes.

A compatible Rigged Object opens the rig clip picker; an ordinary animated object keeps the sprite-frame picker. On a wide picker, selecting a clip starts its small looping preview. In a narrow picker, tap the play icon beside a cycle to reveal the preview; close it to make more room for cycles. Then choose Full Animation, Body Part, or Additive. The preview shows that clip on its own; test combined animations in your scene. Speed Multiplier controls rig clip speed; the frame FPS control is for sprite animations. Set Transition Duration for a softer change. On a compact screen, compare clips under Animation, tap Next for Playback settings, then Select Animation to confirm.

Body Part requires a named bone group from the exported rig. Additive can use Whole Rig or a group and adds changes from the clip's first frame. Custom rigs must define their own groups in Art Studio, save, and update the Rigged Object export. The behaviour still targets the complete character.

If the target is supplied dynamically by an Object ID, choose a reference asset in the Asset Library when prompted. That determines which animation picker opens without replacing the dynamic target. At runtime the target must use a compatible rig asset and selected clip/group identities; matching names on an unrelated skeleton is not enough.

See Body Parts and Animation Blending for modes, priority, parent motion, and custom-rig setup, or follow Walk, Crouch, Jump, and Shoot together.

Properties

Triggers Once on Event

Object A

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.

Object B

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.

Power

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.

# Jumps

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.

Wall Jump

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

Auto Flip

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.

Lock Rotation

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.

Play Animations

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.

Custom Animations

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.

Animation Priority

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.

Sound

Select a sound to play each time the jump button is pressed.

Outputs

Object ID

Outputs the object's ID.

Examples

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.

Joystick Controlled

Jump

Jump with Button