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
1
Question by wijesijp · Nov 19, 2013 at 06:04 AM · rigidbodycollidertriggerkinematic

Kinematic Rigidbody Collider not colliding with Static Trigger Collider

I have been writing a 2D game on Unity 4.3. I have a player object with box collider 2D with Kinematic Rigidbody. I have another object with box collider 2D with trigger.

For some reason OnTriggerEnter2D event is not firing.

According to documentation this should work.

http://docs.unity3d.com/Documentation/Components/class-BoxCollider.html

If I applied 3D physics to these objects instead of 2D physics it starts to work fine.

Can anyone provide some help on this?

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 Tomer-Barkan · Nov 19, 2013 at 06:44 AM 0
Share

$$anonymous$$aking sure you're using Rigidbody 2d?

avatar image wijesijp · Nov 19, 2013 at 06:57 AM 0
Share

I am using Rigidbody 2d

avatar image wijesijp · Nov 19, 2013 at 11:55 AM 0
Share

bump ......

avatar image racarate · Dec 05, 2013 at 02:52 AM 0
Share

I just ran into this same problem. I'm attempting to make PONG as a test-run of Unity's new 2D features and my kinematic rigidbody circle collider is not triggering OnTriggerEnter2D when it hits a static trigger edge collider.

As with the original poster, when the ball is put under control of the physics solver (by unchecking "is$$anonymous$$inematic") OnTriggerEnter2D is then called on both game objects.

This kind of stinks, and seems to be at odds with what is described in the table at the bottom of this article:

http://docs.unity3d.com/Documentation/Components/class-BoxCollider.html

avatar image rgbDreamer · Dec 11, 2013 at 12:03 PM 0
Share

This has been frustrating me, also. $$anonymous$$akes a kinematic rigidbody totally useless and hamstrings the whole 2D engine.

3 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Runalotski · Jan 20, 2015 at 02:37 PM

Hello i know this is an old post but if some one stumbles apon it with this issue.

A solution is to make the colliders triggers by clicking the box and then using OnTriggerEnter() or OnTriggerEnter2D() depending if its a Rigidbody or Rigidbody2D.

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 Tomer-Barkan · Nov 19, 2013 at 06:58 AM

Edit: My other answer was incorrect.

I tested the minimal scene myself, and it seems not to trigger the event as long as isKinematic on the rigidbody is true. If you set it to false, it fires up correctly.

According to Rigdbody2D.isKinematic documentation, setting isKinematic to true will prevent the rigidbody from participating in physics calculations, including collision events...

It's not really clear if this is supposed to include launching the callback methods and trigger events, or just not be affected by forces, but the documentation is a bit different in this aspect than the 3d Rigidbody.isKinematic.

I suggest reporting this to unity support and see what they say.

Comment
Add comment · Show 5 · 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 wijesijp · Nov 19, 2013 at 07:21 AM 0
Share

I don't see an option to report this from Help->Report a bug. Is there any other way to report this?

avatar image Tomer-Barkan · Nov 19, 2013 at 07:24 AM 0
Share

Use "A problem with the player" to report this bug.

avatar image Tomer-Barkan · Nov 19, 2013 at 07:26 AM 0
Share

And you can contact support via email using: support@unity3d.com.

They did answer me after a few days when I reported another 2d issue (which turned out to be me doing something wrong, but they answered, while my bug post from the editor was not seen yet, as it's still open even though it's obviously not a bug)

avatar image rgbDreamer · Dec 11, 2013 at 12:08 PM 0
Share

I sent an email to support.

avatar image rgbDreamer · Dec 12, 2013 at 12:57 AM 1
Share

I got this reply from support@unity3d.com : "This is not a bug. The RigidBody2D class is not the Same as the RigidBody class. The documentation has not yet been updated and thus can be confusing. According to one of our Developers, the $$anonymous$$inematic Rigidbodies will only collide with other $$anonymous$$inematic Rigidbodies and dynamic and static objects will collide with each other in the 2D system. Dynamic objects can also collide with each other (Rigidbody to Rigidbody). $$anonymous$$ind regards, Unity Support"

avatar image
0

Answer by AltProg · May 23, 2014 at 06:03 AM

It seems that Box 2D doesn't support that.

· A fixture on a static body can only collide with a dynamic body. . A fixture on a kinematic body can only collide with a dynamic body.

from http://www.box2d.org/manual.html

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

22 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

Related Questions

Rigidbody2D alternating between TriggerEnter and TriggerExit? 1 Answer

isKinematic rigidbody collisions 3 Answers

col.gameObject.layer is not working 1 Answer

Having a kinematic rigidbody detect collision with a collider without a rigidbody 7 Answers

On Trigger Enter (No Rigidbody) 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