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
3
Question by HackNslasheR · Dec 29, 2015 at 07:36 PM · error messagespace shooter

Space Shooter Destroy by Contact is dropping FPS! (error: IsFinite(outDistanceAlongView))

I don't know exactly what's going on but my ´´Destroy by Contact`` script that I wrote following the Space Shooter tutorial is acting strange.

When I hit play everything works fine as expected, but whenever I destroy an asteroid I get two error messages and theses messages keep repeating infinitely as the asteroids are destroyed.

One note: the FPS drop increase as the asteroids are destroyed. Here is the script and error message:

(ps. when I remove this line of command, that make the explosion, the error message, also the fps drop stop happening) alt text

alt text

One more important note: when an asteroid is destroyed, its explosion effect remain in the scene, as shown in the hierarchy, see:
http://i.imgur.com/hnfT6W3.jpg (couldn't upload more imagens here)

Could somebody please help me with this problem? I'm starting with Unity and don't know what to do.

screenshot-22.png (17.6 kB)
screenshot-24.png (172.9 kB)
Comment
Add comment · Show 1
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 HackNslasheR · Dec 29, 2015 at 07:43 PM 0
Share

Error messages:
IsFinite(outDistanceForSort)
IsFinite(outDistanceAlongView)

There is this another error that is shown first than the others, but it appears just a single time:
aabb.IsFinite()

4 Replies

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

Answer by ykeyani · Dec 30, 2015 at 01:38 PM

The error is related to the rotation, changing rotation to a fixed value like Quaternion.identity will stop the errors.

 Instantiate (explosion, transform.position, Quaternion.identity);

In many cases these errors are due to invalid values. You can try testing values before using them which will make your code more stable to changes (defensive programming).

Also It might not actually be a unity bug. I think unity 5 does less error handling.

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
1

Answer by A_Li_N · Dec 30, 2015 at 04:53 AM

http://answers.unity3d.com/questions/13544/many-isfinite-errors.html

That looks and sounds much more like a Unity bug than a script bug; might try reporting it.

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 HackNslasheR · Jan 05, 2016 at 05:09 PM

@ykeyani and @A_Li_N

Thanks for replying, before trying this solution I posted the same question on a Brazilian group on facebook I participate, and I got a solution. They said it's a bug from a version I was using, "5.3.1f" or something like that.
I tried the version they recommended me, "5.3.1p1", and it works perfectly, with no errors, I needed change nothing.

I think it might be a bug since another version showed that the game can run with no erros using the same code.

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 J_Loubert · Jan 12, 2016 at 04:57 PM

@HackNslasheR hi there, I found I was getting the exact same error but it would occur with both the asteroid explosion and player ship explosion. As @ykeyani pointed out, replacing that part of the code with Quaternion.identity in both instances fixed it. running version 5.3.1f1 personal

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

37 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

Related Questions

ObjExporter causes errors but I have not tried to use that script 0 Answers

Error CS1061 0 Answers

Error stage @username 1 Answer

A list of a struct doesn´t saw a word in the console. Object reference, but i dont have anyone 1 Answer

Getting the error "ullReferenceException: Object reference not set to an instance of an object PlayerCasting.Update () (at Assets/Scripts/PlayerCasting.js:7) on my JavaScript raycasting script 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