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 /
avatar image
2
Question by Tryggvienator · Mar 24, 2014 at 11:58 PM · rotationpositionlookatnancompareapproximately

!CompareApproximately (det, 1.0F, .005f)

I've got a big battle going on, lots of flying objects etc. Worked fine for days. Then all of a sudden I start getting these errors.

!CompareApproximately (det, 1.0F, .005f) UnityEngine.Transform:LookAt(Transform, Vector3) (I have verified that the object to look at exists. and is within reasonable position within the scene.)

transform.position assign attempt for 'Bullet' is not valid. Input position is { NaN, NaN, NaN }.

transform.localRotation assign attempt for 'MuzzleFlash' is not valid. Input rotation is { NaN, NaN, NaN, NaN }. UnityEngine.Transform:set_localRotation(Quaternion)

transform.rotation assign attempt for 'Base' is not valid. Input rotation is { NaN, -0.469401, 0.645964, 0.437326 }. UnityEngine.Transform:set_rotation(Quaternion)

transform.position assign attempt for 'CombatCamera' is not valid. Input position is { NaN, NaN, NaN }. UnityEngine.Transform:set_position(Vector3)

And then it just build up more and more.

Any Idea whats causing this? is this a Unity Bug?

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

2 Replies

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

Answer by Tryggvienator · Mar 25, 2014 at 01:20 AM

Okay.. Just solved my own problem. It seems that a missing reference to a script was causing this. Undetected by a try catch clause. This caused a chain reaction across my project, affecting everything mentioned above. Wow.

This wrecked my project. Lesson learned.

Comment
Add comment · Show 2 · 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 warhammercasey · Oct 18, 2015 at 10:03 PM -1
Share

I have the same problem and i'm not sure if this also happened to you but did you get another error saying 'F$$anonymous$$OD failed to get driver capabilities ... Error initializing output device' and have nothing in the scene or game view. Also, how did you fix the problem if you did. (I still have all my assets but nothing in the scene or hierarchy)

avatar image warhammercasey · Oct 18, 2015 at 10:24 PM 0
Share

Never $$anonymous$$d what I just said. I just didn't have the scene selected. But i still am getting those errors when I start up the project and for some reason a random tree texture appeared in my assets. Had a heart attack there.

avatar image
2

Answer by Partel-Lang · Jul 21, 2016 at 06:22 PM

It usually happens when you have a logical error somewhere in your calculations (for example division by zero) and you attempt to make a Quaternion based on that calculation. The easiest way to reproduce this error is with code like this:

 Vector3 v = Vector3.one;
 v /= 0f;
 Quaternion r = Quaternion.LookRotation(v);

So if you get this error, debug what your functions return and if there is a NaN or Infinity anywhere, it might be it.

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 Omti1990 · Nov 15, 2020 at 11:50 AM 0
Share

Thank you for the explanation. In my case the input vector left the bounds of a float because I set a comparing operator in the wrong directions :/ (At least I think that happened, it grew exponentially with each frame)

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

23 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

Related Questions

Enemy circling around the player when using LookAt 1 Answer

How Can I Stop Rotation From This Script? 0 Answers

Changing the forward rotation for LookAt 2 Answers

Look at like rotating around y axis 1 Answer

SphereCast help 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