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
0
Question by aleichert · Oct 19, 2014 at 03:05 AM · bug

Unity Object suddenly "freezes"

Hey there,

so I made a Unity2D game for Android and everything works fine - except for one major "problem".

In the game, the protagonist is a circle in the center that is being attacked. It gets damage if an enemy collides with it.

When I play it in the editor or on my smartphone, after a while, it does not respond to collision anymore - even if I do nothing - resulting in it being invincible, and hey, that's fun for the player, but not fun for me :P Aside of the one object "freezing", everything else is working fine...

So, my question is, do you know why this could be? Is there a common problem with Unity2D for Unity3D v4.5.5?

Both, enemy and protagonist have 2D trigger circle colliders, function for collision is OnTriggerEnter2D.

Code: http://pastebin.com/c9hvdg4i NOTE: If I change stuff like "if(damage != -10)" to "if(damage != 10)" it works - and then, when I change something else like "damage += 1" to "damage -= 1" it breaks again, even though nothing of either changes any logic of the game - aside from preventing it to die xD I added Debug.log() Statements to get called even if it just gets any collision - nothing appears!

This bug is annoying, I tried re-installing Unity. I recently upgraded to the BETA 4.6 of Unity, and then "downgraded" again to continue development, before everything worked fine, that's why I tried the re-install. Pointless.

This is really annoying because I was just about to put it on the PlayStore :(

Sincerely, aleichert

Additional information: | OS Windows 7 | Unity3D v4.5 | Target platform Android |

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 Kiwasi · Oct 18, 2014 at 11:33 PM 0
Share

Couple of clarifications

  • Does your Debug.Log("impact") still turn up on collisions? What about I$$anonymous$$PACT or YEP?

  • Is it just collisions that are not responding, or does input freeze up as well?

This does not sound like a Unity bug. Its probably something in your code.

avatar image Kiwasi · Oct 18, 2014 at 11:36 PM 0
Share

Just reread your question again, you already said none of the debugs show up. That means its probably a collider problem. Play the game in the editor until the problem occurs, and check that the various colliders and ridigbodies are all still in place. Nothing has been disabled or deleted.

avatar image aleichert · Oct 18, 2014 at 11:57 PM 0
Share

Hello Bored$$anonymous$$ormon.

Thank you for replying. I did check, both enabled, both triggers.

The enemies are colliding with the circle, though the circle is not responding at all. As if the code wasn't there, it is though, as I can see it in the editor.

I swapped all the visual- and logic changing code to other objects for now. This means that the circle merely is there for visuals. This is a performance hungry option though and not ideal for the future- it can serve as a "temporary replacement" in the meanwhile though so that I can continue development.

Sincerely, aleichert

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Multiple Cars not working 1 Answer

state change with button but falls back to previous 2 Answers

Entering Data into a 2d array overwrite issue. 1 Answer

How do you add a fixed joint to a first person controller 1 Answer

My character keep walking left. (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