Player Controller PART 3: How To Make Player Jump (Tutorial)

This is the third part of our character controller tutorial.
In this video you'll learn how to make our player jump, and how to use Spine-Unity standard animation events.
Hope you'll find it useful! 👍
Here's the link to the official Spine Unity Runtime documentation:
esotericsoftware.com/spine-uni...
_______________________
FOLLOW US
►Instagram:
/ thinkcitric
►Twitter:
/ citricthink
_______________________
MUSIC
Beach Buggy Ride by SIRPRICE / sirpricedj
Creative Commons - Attribution 3.0 Unported- CC BY 3.0
creativecommons.org/licenses/b...
Music promoted by Audio Library • Beach Buggy Ride - Ele...
#spine2d #unity2d #charactercontroller #unitytutorial #madewithunity #madewithspine #spineanimation #skeletonanimation #tutorial #howto #thinkcitric #gamedev #gamedevelopment #unity2019 #playercontroller

Пікірлер: 30

  • @cokeslushy26
    @cokeslushy264 жыл бұрын

    Don't know how this has so few views/comments. Seriously the best series for showing the basics of Unity/Spine.

  • @ThinkCitric

    @ThinkCitric

    4 жыл бұрын

    Thank you so much!

  • @MSDdirtbags
    @MSDdirtbags3 жыл бұрын

    You are super helpful !

  • @AniChe9
    @AniChe94 жыл бұрын

    спасибо, очень сильно помогли ваши ролики со Spine

  • @nguyenxuantoan7426
    @nguyenxuantoan74265 жыл бұрын

    Great! Keep it up ♥ thank u

  • @ThinkCitric

    @ThinkCitric

    5 жыл бұрын

    Thank you! Glad you liked it. :)

  • @AngelRodriguez-zw4nh
    @AngelRodriguez-zw4nh3 жыл бұрын

    I have been really enjoying the tutorials. I think they have awesome information that has been incredibly helpful. I am running into an issue with Jumping. I have the same code(changed some variable names) but my player wont jump. I see that it attempts to do it but it doesnt leave the ground. I used Debug.Log("Jump") and I see where the statement is called but the player doesnt jump. I played around with the jumpSpeed but no luck either. Any advice?

  • @Civil_Hunter
    @Civil_Hunter4 жыл бұрын

    animationEntry.TimeScale = timeScale; must be :D

  • @ThinkCitric

    @ThinkCitric

    4 жыл бұрын

    Yes, thank you! They've changed the syntax in a newer version of Spine-Unity runtime.

  • @VJ.EnglishForFun
    @VJ.EnglishForFun3 жыл бұрын

    Good lesson! Can you do such a lesson only on javascript?

  • @justinmama4238
    @justinmama4238 Жыл бұрын

    Hi Why does the character rise when I click the jump key after setting the jump speed value?

  • @inkwrist96
    @inkwrist965 жыл бұрын

    Great video, and clear voiceover, my only suggestion is if you can zoom on your codes sometime if its a crucial line, i view this on phone and it seems to hurting to the eye to see tiny lines of code. But in laptop i think this wouldnt be a problem. Thanks! And goodluck on your projects.

  • @ThinkCitric

    @ThinkCitric

    5 жыл бұрын

    Thank you so much for your feedback! :) I'll keep in mind to zoom in on the code next time I create a tutorial.

  • @pidgladun_game
    @pidgladun_game11 ай бұрын

    Hello very cool can you make a video where everything is the same only for the control for the phone

  • @jehramdavejara2086
    @jehramdavejara20863 жыл бұрын

    My jump is only one animation of takeoff midair and land, however there are times when my player is landing on midair. Is breaking the jump sequence into three parts more viable? I've done the animation but don't know how to implement the code XD. I have figured out the take off and midair but i struggle to find the solution for landing, somehow it doesnt get played at all.

  • @jojocreator4779
    @jojocreator47793 жыл бұрын

    Hey! Great Tutorial! I really love how simple and clear you make these. I Just have a question. Lets say I had a Jumping and sliding animation states. Would I need two "AnimationEntry_Complete(Spine.TrackEntry trackEntry)" methods or just the one. Ive tried many things but nothing is working.

  • @ThinkCitric

    @ThinkCitric

    3 жыл бұрын

    Thank you so much! :) Regarding your question, you'll need one AnimationEntry_Complete. Inside the event function, you can have if() or swicth-case statement, and check what was the name of the animation that has just finished playing. something like this: if(animation.name.Contains("jump")) { //do something } else if(animation.name.Contains("slide")) { //do something else } Hope it helps!

  • @Magic__Man
    @Magic__Man4 жыл бұрын

    Hello! Thanks for the tutorial you made, it helped me a lot. you can be asked to tell me how to add another animation, for example Hit, so it will become clearer how to combine changing animations.

  • @ThinkCitric

    @ThinkCitric

    4 жыл бұрын

    Hi! Adding a new animation like hit is pretty much the same as adding a jump. You'll need to declare a new AnimationReferenceAsset at the top of the PlayerController class, add a new condition to SetCharacterState method, a method called Hit(), and a new condition to the AnimationEntry_Complete event. If it sounds confusing, just try changing Jump to Hit, and see what happens. BTW, the attack button in Unity is called Fire1 or Fire2, and you can define them via Edit->Project Settings->Input. Hope it helps!

  • @calebanderson9465
    @calebanderson94652 жыл бұрын

    How do you make the character blink during the animations

  • @vostinariuvlad5393
    @vostinariuvlad53933 жыл бұрын

    Something doesn't seem all right here, I have a problem which i think it's related to setting the "idle" animation in that else condition. Basically it keeps trying to set the idle animation (even though it won't keep resetting the animation due to the if check in SetAnimation function) but it will keep trying with every frame. I have a collision detection with some enemies which are supposed to trigger the "Die" animation on collision, and due to the else it will override with the idle animation and the Die one will never play.

  • @ukraine_bandera_god
    @ukraine_bandera_god4 жыл бұрын

    Hi, do u have How to build .exe?

  • @vybstaakaindian
    @vybstaakaindian3 жыл бұрын

    I GOT AN ERROR MESSAGE CS1061 "TRACK ENTRY" DOES NOT CONTAIN A DEFINITION FOR "TIMESCALE" I CHECKED CODE WITH YOURS FEW TIMES CANT SEEM TO UNDERSTAND IT MAYBE IM MISSING SOMETHING ?

  • @vybstaakaindian

    @vybstaakaindian

    3 жыл бұрын

    BUT I FIXED THE SPINE EXPORT ISSUE FROM BEFORE IT NEEDED TO UPDATE

  • @user-ng4uz5sk2z

    @user-ng4uz5sk2z

    2 жыл бұрын

    NEEED TimeScale but not timeScale

  • @gohelboy
    @gohelboy4 жыл бұрын

    Hey nice video but can u teach how to make this in ui button jump cause. I am making game in mobile platform game and i am new in unity . ☺️

  • @ThinkCitric

    @ThinkCitric

    4 жыл бұрын

    Thanks for your feedback! Okay, I'll add this to the future tutorials list. :)

  • @lockofmetal8894
    @lockofmetal88944 жыл бұрын

    @Think Citric Hello, im really new to Unity and Spine and only been using it a couple of times. So i followed this tutorial and my character can jump an infinite amount of times and basically fly away. What can i do to fix this? Thanks!

  • @ThinkCitric

    @ThinkCitric

    4 жыл бұрын

    Hi! The infinite jump is a common problem, you just need to code some conditions for the jump to start: the character should be on the ground, maybe add a timeout, etc. There are plenty of free Unity tutorials explaining how to implement that, but I want to recommend a specific one: a Raycast controller series made by Sebastian Lague. It is free on KZread, and it works like a charm. I've combined it with the Spine controller logics that I explained in my videos, and the result looks really smooth.

  • @lockofmetal8894

    @lockofmetal8894

    4 жыл бұрын

    @@ThinkCitric Thank you! I'll check it out