Disable the isJump boolean in the animator to stop the jump animation once you've reached the ground?

This page summarizes the projects mentioned and recommended in the original post on /r/Unity2D

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • 2D-Character-Controller

    Free 2D Character Controller for Unity.

  • The gist in most character controllers you see is: Every frame, use some sort of physics function* to see if the player is on the ground or not (i.e. isGrounded = true). If they are, and the player hits the jump key, set isJump = true, and isGrounded = false (and animate your jump etc) If they are already jumping (isJump == true), but isGrounded becomes true, set isJump = false, and stop your jump animation. There are various ways to check grounding. Could use a Raycast, Overlap Casts, A dedicated collider etc.  The brackeys example (which I dislike for other reasons), shows this well enough: https://github.com/Brackeys/2D-Character-Controller/blob/master/CharacterController2D.cs

  • DarkSide

  • This is an example from my own code (a 3D FPS controller, same diff though) with double jumping: https://github.com/Hacksie/DarkSide/blob/main/Assets/Scripts/PlayerController.cs

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts