top of page

Player Controller

Updated: Jun 6, 2023

- Used Brackeys 2D Character Controller as the base for my 2D Character Controller, removing what I didn't need and adding what I do



1) jumpForce calculated based on how long the JUMP key is held <SPACE>.


2) Player will automatically jump after hitting the max jumpForce.


3) Jump direction based only on whether directional key is held while"charging" the jump <rightArrow> or <leftArrow>. Player will jump straight upward only if no arrow key is held.


4) Player cannot move while "in the air". The jump path is fixed as soon as the jump key is released or the jumpForce maxes out.


5) Player cannot move while "charging up the jump".


6) If player collides with terrain while jumping, there is a deflection/bounce-off effect.



----------------------

6/5/23

Left/right movement working



7/5/23

Jump movement working


9/5/23


Added charge jumping


 

References


Brackeys (2018) 2D Movement in Unity (Tutorial). YouTube. [online]. Available from: https://youtu.be/dwcT-Dch0bA [Accessed May 1, 2023].


Brackeys (2018) Brackeys/2D-Character-Controller: Free 2D Character Controller for Unity. GitHub. [online]. Available from: https://github.com/Brackeys/2D-Character-Controller [Accessed May 1, 2023].


Comentarios


Hi, I'm Jeff Sherman

I'm a paragraph. Click here to add your own text and edit me. Let your users get to know you.

  • Facebook
  • Twitter
  • LinkedIn
  • Instagram

Creativity. Productivity. Vision.

I'm a paragraph. Click here to add your own text and edit me. I’m a great place for you to tell a story and let your users know a little more about you.

Subscribe

Thanks for submitting!

bottom of page