Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 /
  • Help Room /
This question was closed Dec 03, 2015 at 06:02 PM by $$anonymous$$ for the following reason:

The question is answered, right answer was accepted

avatar image
0
Question by $$anonymous$$ · Dec 05, 2015 at 04:29 PM · movementpositioncharacter controllerstuckstate-machine

Character Cannot Move from its Spot

I've got a multi-player project where I'm using a state machine on a character (that is instantiated at a certain spot) with a character controller. The script takes input every frame, but for some reason the character won't move at all.

This is the movement section of the script:

 private void movement() {
         if (movementHorizontal > 0) {
             player.thisChar.transform.rotation = Quaternion.Euler(Vector3.zero);
         }
         else if (movementHorizontal < 0) {
             player.thisChar.transform.rotation = Quaternion.Euler(0, 180, 0);
         }
         movementDirection = new Vector3 (movementHorizontal, 0, movementVertical);
         //player.thisChar.transform.position += movementDirection * player.speed * Time.deltaTime;
         player.controller.Move (movementDirection * player.speed * Time.deltaTime);
     }

The player will turn, as expected, however they will not move from that spot. I've tried using RigidBodies, I've tried editing the position directly (hence the commented out part of the script), and even editing the position in the inspector. IT WILL NOT BUDGE.

The entire project file can be found below. I really need help, I can't figure out what's going wrong.

https://drive.google.com/file/d/0ByMNe0bC15PxekN0RHM0RWVpTFk/view?usp=sharing

(Note: I've posted this same question again because I originally sent it to the Help Room and realized that it may be too specific a problem for that area.)

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 $$anonymous$$ · Dec 03, 2015 at 06:02 PM 0
Share

I found the error and it's a stupid one. I made the old beginner mistake of not checking the "Apply Root $$anonymous$$otion" option on the Animator.

0 Replies

  • Sort: 

Follow this Question

Answers Answers and Comments

2 People are following this question.

avatar image avatar image

Related Questions

Character Will Not Move from Spot (At All) 0 Answers

Controller script active on both characters. 1 Answer

Why is my player getting stuck when jumping into awalls? 0 Answers

"Is Walking" is constantly on and I can't turn it off. Help? 0 Answers

First person movement with character controller does not detect ground properly 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