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 jamesar · May 29, 2014 at 11:24 PM · rigidbody2dcollision2dunity 4.5unity4.0 problem

OnCollisionEnter2D Problems in Unity 4.5

Hey everyone,

I've been having some pretty severe collision detection problems ever since upgrading to Unity 4.5. To prove my theory I even rolled back Unity to 4.3.4 where my collision detection and functions worked again without flaw. I'm hoping someone may have some insight as to what the problem might be or that there are at least other people experiencing the same problem. Here's a little more detail:

I've created a 2d scene that uses 2d rigid bodies, and 2d colliders. I spawn 2d objects from the top of the scene and the goal is to catch these objects. All of my collision detection is done in my player class's OnCollisionEnter2D function. Basically, if the Collision2D.gameObject.tag is equal to a certain tag, I add/subtract/ do whatever appropriately. This works for some of my game objects but doesn't appear to work with objects that have particle systems attached to them, and eventually when the game gets hectic, very few objects actually register the collision with the player.

Hopefully someone can help me with this problem, otherwise It looks like I will be continuing to use Unity 4.3.4 for the remainder of this project. Thanks for taking a look!

  • J

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 mheyman89 · Jun 16, 2014 at 08:15 AM 0
Share

I am having a similar problem I have two objects that check for OnCollision2D, as of 4.5 only one of the objects seems to fire this. Is there a reason why? I can't figure it out.

All i was saying is when object A collides with B set object A's parent to B. Doesn't work anymore.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by IgorFira · May 30, 2014 at 02:18 PM

To work around that I'm using the other collider's OnCollisionEnter2D to send a message to the collider.

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

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

Disappearing platform problem - RigidBody2D and BoxCollider2D 0 Answers

[SOLVED] How to Destroy a rigidbody game object on collision with another gameobject? 4 Answers

Trigger detection failing when laggy 0 Answers

How to find speed in certain direction? 1 Answer

Stack/Tower of inelastic collider2D + rigidbody2D bounce when collide with ground, single collider2D + rigidbody2D does not bounce 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