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 /
avatar image
0
Question by noamraz · Apr 07, 2020 at 11:42 PM · movementtransformscalebugsbug report

With No Reason, My Character Stopped Looking To the Way She Goes.

Hi, I am Noam, I'm a beginner In unity and I made a game using unity. Till now all was good. I just tried to remake things I loved in other games. And today after adding an animation, My Character Just Stopped Moving to Her Right way. I didn't Make ANY change in the code and she just not Doing it.

Photo:

character don't changing sides

It started 2 weeks ago when I tried to make an item that changes her color and it didn't work. Even Manually Changing Through the Inspector In PlayMode didn't changed her color and I forgot that but now, it's happening even with the Looking. It didn't worked manually too. I need it to work.

I don't know If it's a problem of unity or not but I really want to finish that game and continue using unity for game making and that is very annoying that you make a game and it is working just for the first week and then dies. Please Help Someone. that's very important to me.

( I Wrote The Movement Code and Color code from Tutorials so I'm pretty sure it's not my "beginnery" thing.)

EDIT: Solved It. That was The Animation...

If you need it this is the input code:

 private void InputManager()
     {
         //horizontal moving axis
         float hDirection = Input.GetAxis("Horizontal");
 
         //animation speed
         anim.speed = 1;
 
         //shift clicking for speeding the character
         if (Input.GetKey(KeyCode.LeftShift))
         {
             //making the moving speed faster
             nowMoveSpeed = normalMoveSpeed + fastMoveSpeed;
             //making the animation faster
             anim.speed = 2;
         }
         //if the shift is not clicked
         else if (!Input.GetKey(KeyCode.LeftShift))
         {
             //normalizing the moving speed
             nowMoveSpeed = normalMoveSpeed;
             //normalizing the animation speed
             anim.speed = 1;
         }
 
         //right movement
         if (hDirection > 0)
         {
             //RigidBody move forcing
             rb.velocity = new Vector2(nowMoveSpeed, rb.velocity.y);
             //make the character look to the right place
             transform.localScale = new Vector2(1, 1);
             PlayerName.transform.localScale = new Vector2(0.01384126f, 0.01384126f);
         }
         //left movement
         else if (hDirection < 0)
         {
             //RigidBody move forcing
             rb.velocity = new Vector2(-nowMoveSpeed, rb.velocity.y);
             //make the character look to the right place
             transform.localScale = new Vector2(-1, 1);
             PlayerName.transform.localScale = new Vector2(-0.01384126f, 0.01384126f);
         }
         else
         {
             //if not clicking on any key the program needs to do nothing
         }
 
         //jumping, and make a jump number limitation
         //if the jumping key pressed, and the character is not touching the ground
         if (Input.GetButtonDown("Jump") && coll.IsTouchingLayers(ground))
         {
             Jump();
         }
         //if the jumping key pressed, and the jump count is less then the accepted jumps in one jump
         else if (Input.GetButtonDown("Jump") && jumpCount < jumpNumInAir)
         {
             Jump();
         }
         //if the character is just touching the ground
         else if (coll.IsTouchingLayers(ground))
         {
             //jump number will be equal to 0
             jumpCount = 0;
         }
     }


צילום-מסך-505.png (79.6 kB)
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
Best Answer

Answer by noamraz · Apr 08, 2020 at 12:14 AM

Just Solved it. The problem was the Animation.. Sorry Unity for judging. You are awesome!

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

209 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 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

Instantiated projectile always floats up 1 Answer

How is localScale adjusted when re-parenting transforms? 2 Answers

I'm interpolating an object between positions and rotations. Now I need to make sure it happens in front of the camera. 1 Answer

How can I make a collision sensitive teleporter for a 2D game #c 1 Answer

How can i Limit the Mouse X Axis for Mouse Look 3 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