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 blaknwhitejungl · Nov 17, 2013 at 12:00 PM · movement scriptunity input

Tutorial Ball Won't Move

Hi, I'm a complete newb to both Unity and the forums, apologies if this has been answered a million times before.

I'm following the Unity Roll-a-Ball tutorial. I just got to the step where I add movement to the ball with a C# script. My script is verbatim the same as the one in the tutorial video, but my ball doesn't respond to keyboard input.

I've already checked the Input manager, and the correct buttons are set up for the horizontal and vertical axes, and I made sure that my ball has a rigidbody and that the plane has a mesh collider. I've added a speed variable so I'm fairly certain the problem isn't just incredibly slow movement. I also moved the ball up in the air, just to check that physics was working correctly. As expected the ball fell and landed on the plane.

Can anybody think of something basic I've forgotten? The videos don't have a list of common mistakes or anything, and I've checked everything I know enough to check.

Comment
Add comment · Show 1
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 joonturbo · Nov 17, 2013 at 01:36 PM 1
Share

off the top of my head:

  • be sure the ball script is sitting on the ball gameobject

  • Rigidbody can't be $$anonymous$$inematic

  • None of the colliders can be triggers

  • put a 'Debug.Log("I moved!");' in your script to see if the script is executed

  • try exaggerating values (add force or velocity of 100000000).

  • uncheck all constraint checkboxes on the ball...

  • Try attaching your $$anonymous$$onodevelop to Unity and setting a breakpoint on your relevant movement code to see with which vlaues it is executed

3 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by blaknwhitejungl · Nov 17, 2013 at 08:06 PM

joonturbo's comment led me to find that my log wasn't reaching the console, and I eventually realized that I was calling fixedUpdate not FixedUpdate. Thanks for your help guys!

Comment
Add comment · 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
0

Answer by MrAkroMenToS · Nov 17, 2013 at 01:57 PM

It happens, when unity stop refreshing. Try to reimport manually all of the scripts and assets, or just restart the Unity. I have had this problem before, and it can be really annoying. I hope that helped.

Comment
Add comment · 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
0

Answer by atleast6 · Oct 31, 2016 at 10:11 PM

For anyone else who hit this problem - a pointer from a Unity noob.

You did under the player properties - player controller settings - where it says the script name..... set a speed value? (the default is 0). As we know - anything times 0 is 0..... hence no movement.

I shall sit in the corner now.

Comment
Add comment · 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

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

21 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

Related Questions

Moving AI away or towards player not working correctly. 1 Answer

Audio PlayOneShot Help 1 Answer

Having trouble with a basic movement script. 2 Answers

how do i script wasd movement into my game 2 Answers

How to move 2D enemy AI's along the x-Axis? 0 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