Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Hypocrita_20XX · Feb 13, 2014 at 05:46 AM · animationjumpjumping

3DBuzz Third Person Character Jumping And Landing Issue

Hey everyone, I hope you've all had a great day so far.

As I continue on with the 3DBuzz tutorial series on a third person character and camera system, I'm running into more and more problems, some of which I can solve, some of which I have no clue how to solve. This particular issue is concerning the jumping and landing animations. Essentially, I can jump up just fine, but without animations, use the proper falling animation, and land just fine, yet without animations, either. My code for this functionality is as follows.

In TP_Animator.

 void Jumping()
 {
     if (!anims.isPlaying && TP_Controller.Character_Controller.isGrounded || 
         TP_Controller.Character_Controller.isGrounded)
     {
         if (lastState == CharacterState.WalkingForward)
             anims.CrossFade("Jump Land"); //Intended to have a specific animation, such as a walking land, which doesn't exist yet
         else
             anims.CrossFade("Jump Land");

     State = CharacterState.Landing;
     }
     else if (!anims.IsPlaying ("Jump Up"))
     {
         State = CharacterState.Falling;
         anims.CrossFade ("Bind Pose"); //Intended for a falling animation, which doesn't exist yet
     }
     else
     {
         State = CharacterState.Jumping;
         //Help determine if the player has fallen too far
     }
 }

 public void Jump()
 {
     if (!TP_Controller.Character_Controller.isGrounded || IsDead || State == CharacterState.Jumping)
         return;

     lastState = State;

     State = CharacterState.Jumping;
     anims.CrossFade("Jump Up");
 }

 void Landing()
 {
     if (lastState == CharacterState.WalkingForward)
     {
         if (!anims.IsPlaying("Jump Land")) //Intended to be the walking land animation, which doesn't exist yet
         {
             State = CharacterState.WalkingForward;
             anims.Play ("Forward Walking");
         }
     }
     else
     {
         if (!anims.IsPlaying("Jump Land"))
         {
             State = CharacterState.Idle;
             anims.Play ("Idle");
         }
     }
 }

In TP_Controller.

 void HandleActionInput()
 {
     if (Input.GetButton("Jump"))
     {
         Jump ();
     }

     //Not used as of yet
     if (Input.GetKeyDown(KeyCode.E))
     {
         Use ();
     }
 }

 void Jump()
 {
     //Check to see if the player is sliding, if so, don't allow jumping because
     //they can glitch out the sliding by jumping up the incline
     if(!TP_Motor.Instance.isSliding)
     {
     //Check to see if the player is allowed to jump
     if (canJump)
     {
         //Disallow the player from jumping, which sets off a timer
         canJump = false;

         TP_Motor.Instance.Jump();
         TP_Animator.Instance.Jump();
     }
     else
         return;
     }
 }

To elaborate, I've logged extensively and found that my jump and land animations, as well as their associated functions, are indeed being called, but are so brief that the animations hardly ever register. I can, on some occasions, see a very brief glimmer of the landing animation, but have yet to see any hint of the jump animation during game-play.

Thank you for your time in reading this, and have a great day! -Hypocrita_20XX

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

18 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Problems with Jumping 0 Answers

How to position the jump animation with the object's body? 1 Answer

Choose Start and End Frame for 2D Animation 0 Answers

Jumping animation? Moving through objects? Syncing jump animation? 2 Answers

How To Lock Direction While Jumping? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges