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 /
avatar image
0
Question by halfbakedprophet · Aug 05, 2016 at 03:34 PM · rotationbug-perhapseulerangles

Different rotation behaviour in regular playmode vs. step-by-step?

I'm building a camera system for a third person game, which I won't go into specific detail about as it's too elaborate for this question, but a weird Unity bug is making debugging it even more difficult than it already was.

Some new behaviour I'm implementing affects x rotation (through eulerAngles), and for some reason in playmode the camera x rotates from about 55-45 in a constant cycle. Whenever I pause and step-by-step, it completes the current cycle, then rests indefinitely on 45.

Does anyone know of any Unity behaviour that my code could be having a weird update order conflict with? Or is this a result of some known bug? Any insight is greatly appreciated.

Comment
Add comment · Show 3
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 Owen-Reynolds · Aug 05, 2016 at 03:38 PM 0
Share

$$anonymous$$ore than likely that's just the way your code works. Probably a ti$$anonymous$$g issue with FixedUpdate vs. Update or Time.deltaTime being 0.25 seconds (does it even do that?) or a coroutine which just happen to interact differently when slowed down by stepping.

Doing anything which involves reading then changing eulerAngles is also very error-prone.

avatar image halfbakedprophet Owen-Reynolds · Aug 08, 2016 at 05:31 PM 0
Share

That's what I was thinking, but it's extending to code beyond just angle manipulation too. I'm trying to implement occlusion avoidance, and when I step through the camera smoothly stops where it's supposed to based on raycast collisions, yet when I unpause it freaks out and the boolean logic somehow gets changed. Not using any coroutines, everything is being called in the same LateUpdate block.

avatar image Owen-Reynolds · Aug 08, 2016 at 09:48 PM 0
Share

I should say I've never seriously used the debugger (with $$anonymous$$onodevelope.) Print statements and clever test cases have solved everything for me so far.

Your second case, where it works with a debugger breakpoint, but not live -- that's just odd. But either way, I'd debug the thing running real-time, using the aforementioned print statements. Then you can check whether it's a debugger bug, or a legitimate "oh, it shouldn't work with a time-step of 1 second," or a real but intermittent bug ... .

0 Replies

· Add your reply
  • Sort: 

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

How to make a 2d player sprite rotate without messing up movement with C#, 0 Answers

How to make a 2D sprite rotate towards a specific point while facing perpendicular to the camera ? 1 Answer

Trouble with rotating player when gravity is shifted 0 Answers

Quaternion Rotation - AngleAxis/EulerAngle 2 Answers

Quaternions: Setting rotation of one gameObject to Y,Z-Axis rotation of gameObject-A and Z-Axis position of gameObject-B 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