Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 11 Next capture
2021 2022 2023
1 capture
11 Jun 22 - 11 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 kk99 · Jul 08, 2015 at 04:44 AM · unity 5rotationbugthird person controllersnapping

Unity Asset Prefab Bug ThirdPersonController (left rotating bug / Snapping forward Always)

Alright guys,

I dont think I have done something wrong because I set a new scene, added one plane and added the untouched ThirdPersonController.

I took a video because it's little hard to explain. If you face towards X Axes and then turning left, it does snap back to forward, turning right works fine.

Here is the video. https://drive.google.com/file/d/0B6pwzZMTAZQqREsyZTVVSExWZUk/view?usp=sharing

How to fix this....?

played more and figured out:

if you are in rotation 0 0 0 and you look forward. if you move down but with the right side (see picture) there is no snapping.

HOWEVER, if you move down using the left turn, it starts snapping.

JESUS, what crap is this? How could be such a buggie Asset come from Unity -___-

is this supposed to be a feature? alt text

Thanks for any help. Cheers :)

thanks for any help :D

capture.png (175.0 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

3 Replies

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

Answer by vinternet2000 · Nov 02, 2015 at 01:56 PM

I think the error is in the Atan() function in ThirdPersonCharacter.Move, which returns the value of Pi when move.magnitude = 0 in certain cases. It seems like it's probably a trigonometry error where it should be returning 0. I fixed the issue with this code:

 if (move.magnitude > 0f)
 {
   m_TurnAmount = Mathf.Atan2(move.x, move.z);
 }
 else
 {
   m_TurnAmount = 0f;
 }


Comment
Add comment · Show 1 · 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 kk99 · Dec 01, 2015 at 06:19 PM 1
Share

HOY S$$anonymous$$O$$anonymous$$ES!!! I knew it was something about that $$anonymous$$athf.Atan2 Function but I could never ever figure out how to fix it .

I know my response is later but I so much appreciate your answer. BIG THAN$$anonymous$$S I must have spent about 100 hours for this crap until I decided to leave it unfixed :(

avatar image
1

Answer by PhaetonLT · Jan 18, 2019 at 02:33 AM

In my version the solution from reddit worked: https://www.reddit.com/r/Unity3D/comments/2yz9i4/i_found_a_bug_in_the_third_person_controller_and/ if (turnAmount == Mathf.PI) turnAmount = 0f;

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 Red_Dragon69 · Sep 17, 2015 at 06:01 PM

Hello, check the Y-Rotation of your camera. If this Rotation is not 0 your character will always drift to the left/right when moving.

This fixed the drifting issue for me.

Best regards :)

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Character Controller strange collision bug 2 Answers

Make Third Person Character Rotate 1 Answer

Ensure free camera lines up behind player 1 Answer

MovieTexture black on Mac build 1 Answer

Ui extension bug 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