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 /
This question was closed Feb 17, 2014 at 02:05 AM by Wuzseen for the following reason:

This was a bug and was fixed in unity 4.3.3

avatar image
0
Question by Wuzseen · Nov 15, 2013 at 12:00 AM · 2drotate object4.3

Bad Input Values for Rotation on Object with 5+ Children

I'm converting my project to utilize some unity 4.3 tools and am encountering errors on objects that are the child of a rotating object. When this object has 5+ children the children start throwing the error:

transform.rotation of 'object' is no longer valid due to a bad input value

And:

Quaternion To Matrix conversion failed because input Quaternion is invalid

I've been able to narrow it down to specifically 5+ objects. If I remove the rotation code for the parent object I don't' get the errors--unfortunately the rotation is vital to my game.

Here's the code that rotates it:

     protected void Rotate() {
 
         if(catnip > 0) {
 
             catnip -= Time.deltaTime;
 
             theSpawner.spawnTime = .5f;
 
         }
 
         else {
 
             catnip = 0;
 
             theSpawner.spawnTime = 1f;
 
         }
 
         float catNipMod = catnip > 0 ? catNipForce : 1;
 
         float rotateSpeed = flip * (catNipMod) * .1f * (collected.Count + 1);
 
         if(rotateSpeed > 1f * catNipMod)
 
             rotateSpeed = 1f * catNipMod;
 
         transform.Rotate(0,0,rotateSpeed);
 
     }

Basically I modify the rotation speed based on the number of children (the collected.Count) then I rotate around the Z axis.

Comment
Add comment · Show 5
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 Josh707 · Nov 15, 2013 at 12:26 AM 0
Share

Could we see the rotation code? I'm thinking there's some manual values being calculated for a Quaternion that aren't correct

avatar image Wuzseen · Nov 15, 2013 at 12:27 AM 0
Share

Sure--I asked this question on the forums and I wasn't manually setting the rotation (I was using rota$$anonymous$$round though). I'll edit it in right now.

avatar image Josh707 · Nov 15, 2013 at 12:39 AM 0
Share

Hmm... I can't see what would make it stop working correctly after 5 children, I'll keep looking for similar problems though.

Has it written the actual values for the invalid Quaternion?

avatar image Wuzseen · Nov 15, 2013 at 01:09 AM 0
Share

I'm not so sure it is directly related to it anymore just did a few more tests and it was happening well after 5 children. I've never seen it happen earlier though.

avatar image Josh707 · Nov 15, 2013 at 01:54 AM 0
Share

Well that's really weird, perhaps it's a bug? Hopefully somebody with a little more knowledge can help you out.

All I can think of now is the rotateSpeed occasionally hitting a weird value and causing some problems, but I've never had to use transform.Rotate so I'm not sure - Or there is another script/animation that is also trying to modify the rotation. Anyways, good luck getting it figured out!

0 Replies

  • Sort: 

Follow this Question

Answers Answers and Comments

17 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

Related Questions

Unity 4.3 Physics 2d Change Axis 1 Answer

Rotating a Sprite to face mouse / target? 2 Answers

2D Animation does not start 1 Answer

How Do I Animate a Sprite in 4.3? 1 Answer

Making the position of the mouse cursor, the reference point for forward movement (2D) 1 Answer


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