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 zaynehemingway · Nov 01, 2021 at 10:23 PM · movement

My Character can't jump

He'll play the jump animation but he won't move. This was the tutorial I used: https://www.youtube.com/watch?v=dwcT-Dch0bA

using System.Collections; using System.Collections.Generic; using UnityEngine;

public class CharacterMovement : MonoBehaviour { public Character_Controller controller; float horizontalMove = 0f; public float RunSpeed = 40f; bool Jump = false; public Animator animator; bool Crouch = false;

 void Update()
 {
     horizontalMove = Input.GetAxisRaw("Horizontal") * RunSpeed;
     animator.SetFloat("IsWalking", Mathf.Abs(horizontalMove));
     if(Input.GetButtonDown("Jump"))
     {
         Jump = true;
         animator.SetBool("IsJumping", true);
     } 
     if(Input.GetButtonDown("Crouch"))
     {
         Crouch = true;
     } else if(Input.GetButtonUp("Crouch"))
     {
         Crouch = false;
     }
 }
 public void OnLanding()
 {
     animator.SetBool("IsJumping", false);
 }
 public void OnCrouching(bool IsCrouching)
 {
     animator.SetBool("IsCrouching", IsCrouching);
 }
 void FixedUpdate()
 {
     controller.Move(horizontalMove * Time.fixedDeltaTime, Crouch, Jump);
     Jump = false;
 }

}

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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by bdubbert · Nov 01, 2021 at 10:49 PM

So it looks like your controller is of type Character_Controller but Brackeys is using CharacterController2D. Are you sure that you have the correct character controller script attached? You have to make sure you are using the one that he links in his video description, because that is a not a vanilla Unity component.


If you are using the correct script, are you sure that you have a large enough jump parameter on your CharacterController2D script?


Also check the rigidbody script attached to your character and make sure that it has "IsKinematic" set to false.

Comment
Add comment · Show 3 · Share
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
avatar image zaynehemingway · Nov 02, 2021 at 12:23 AM 0
Share

It still isn't working. Brackeys never told me to make a script for the rigidbody, and I don't see a setting about kinematics.

avatar image bdubbert zaynehemingway · Nov 03, 2021 at 02:58 PM 0
Share

I apologize, it is a Rigidbody 2D script and so you would select "Dynamic" from the dropdown, there is no "IsKinematic" checkbox. He sets up this component at 5:00 in the video, make sure that you have it set up the same as him.

avatar image zaynehemingway bdubbert · Nov 03, 2021 at 07:00 PM 0
Share

I did everything that he told me to do with the rigidbody, but he still won't jump.

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

188 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 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 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 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 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 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 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 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 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 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

Making a bubble level (not a game but work tool) 1 Answer

Using Mathf.Clamp To Limit Camera Movement 0 Answers

Implement moveSpeed to this object script? 1 Answer

Vector3.Lerp is flinging my character all over the place! 2 Answers


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