2D Ultimate Side Scroller Character Controller
  • Introduction
    • Purpose
    • Overview
  • 🛠️Setup
    • Quick Setup
    • Detailed Setup
  • Content
    • Utilities
      • Custom Attributes
      • Extensions
    • Input System
    • Physics
    • Layers
    • Player Data
      • Physics Variables
      • Walk Variables
      • Crouch Variables
      • Jump Variables
      • Land Variables
      • Dash Variables
      • Wall Movement Variables
  • ⛑️Help
    • FAQ
    • Adding States
    • Removing States
  • Development
    • Features - V1.0
    • Roadmap
  • 📪Contact Me
    • Contact Me
Powered by GitBook
On this page
  1. Content
  2. Player Data

Jump Variables

PreviousCrouch VariablesNextLand Variables

Last updated 2 years ago

This part of the code introduces the JumpVariables class, which includes a nested JumpInfo class. The JumpInfo class allows you to create multiple jumps using a list, and you can choose the animation that will play for each jump using the Animation variable within the nested class. The jump mechanism uses the derivative of the JumpHeightCurve to create a velocity curve that unfolds over a specified time. Additionally, players can move left and right while jumping and landing by adjusting variables such as xSpeedUpCurve, xSlowDownCurve, and xTurnBackCurve. The Jump and Land states are mostly consecutive: the Jump state starts with the player beginning to ascend and reaching the maximum height, and then the player enters the Land state until they touch the ground.