Building a customizable jump in Unity using Animation Curves

Gustav Corpas
5 min readMay 6, 2021

Game development is a lot of fun! But how many times have you sat down with a wonderful idea in mind that never saw the light of day because the initial fase of building character movement can be… a struggle to say the least. Building the same scripts over and over again, each time scouring StackExchange in trying to rember the way to go about it is no fun. And worse — nailing Game Feel takes an absurd amount of time when what you are doing is tweeking numbers, compiling scripts, running the game, tweeking numbers, compiling scripts, runn…

I found a solution that works well enough for me, I have not seen it done anywhere else — thus I wanted to share it with you here!

TLDR;

We are going to be using Animation Curves to edit the feel of the jump by dynamically changing gravity. Jumps often feel floaty because they per default act too much like real-world physics.

Even though I will not be sharing the entire code here (I dont think my exact implementation is pretty enough!) I want to give you the general idea in an overview format. So in short, if you are looking to implement this you want to do the following:

  • Create a Scriptable Object containing information about a specific jump
  • Populate it with one or more…

--

--

Gustav Corpas

I write about technology and society. Or anything that is interesting to me.