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 halimozturk · Mar 08, 2015 at 03:58 PM · collision detectionpolygon collider 2d

Polygon Collider 2D collision problem

I have a ground texture and I used polygon collider on it as you can see in the below picture. alt text

The polygon collider perfectly fits with my texture and I have a ball which moving continuously to the x direction. The ground tiles itself infinetely. Sometimes (not all the time) when the ball goes very fast, the polygon collider acts like there is nothing there. The ball goes inside to the ground like the picture below. alt text

The ball has a circle collider 2D with no triggers and rigidbody 2D with default values. The ground has polygon collider 2D with no triggers and rigidbody 2D isKinematic=true;

I can also reproduce this bug when the ground's rigidbody isKinematic=false;

Can somebody help about this issue ? Is this a bug about polygon colliders ? Or, am I doing something wrong ?

ekran-resmi-2015-03-07-202015.png (29.5 kB)
ekran-resmi-2015-03-07-201825.png (80.7 kB)
Comment
Add comment · Show 4
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 samifruit514 · Dec 04, 2015 at 10:57 AM 0
Share

Did you find any solution? I have the same problem.

avatar image halimozturk samifruit514 · Dec 04, 2015 at 11:01 AM 0
Share

No, I couldn't.

avatar image Salanyel · Dec 04, 2015 at 12:47 PM 0
Share

Some times the collision is not triggered because the GameObject is to fast.

Here the explanation. objectA is at 0,0 and the wall is at 1,1. If the objectA is going slowly, the engine will have the time to detect the collision and prevents it to go through the wall.

But, if your object is too fast, the time between the 2 calculation will let the object go through. The last time I've had this problem, we solve it by reducing the speed of the objectA.

For your second solution, i've had the same problem yesterday. It doesn't detect the collision. I think it's bescause the second object use the force system to don't let the first one go through it.

avatar image Neo_kim · Jun 21, 2016 at 12:44 AM 0
Share

Did you find any solution? I think polygon collider 2d is not perfect. Use the box collider 2d.

3 Replies

· Add your reply
  • Sort: 
avatar image
4

Answer by theleonn · Dec 14, 2016 at 06:39 AM

I solved this problem by changing the Collision Detection in RigidBody2D to Continuous.

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 theleonn · Dec 13, 2016 at 06:42 PM 0
Share

Of course this will make the code more expensive, because the Collision Detection will be always calculated even when not in use.

avatar image
3

Answer by shieldgenerator7 · Mar 28, 2018 at 09:10 PM

Remove the RigidBody2D of the ground. Static objects don't move and thus don't need a RigidBody2D. RigidBody2Ds are only for objects that are meant to move. Removing the ground's RigidBody2D will make the game run more efficiently, too.

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 RabidCabbage · Mar 09, 2015 at 11:40 AM

Have you tried increasing the Iteration solver count in Edit > Project Settings > Physics/Physics 2D ?

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 halimozturk · Mar 09, 2015 at 02:49 PM 0
Share

I don't know what does "iteration solver count" do but i tried. The default value was 6 and I increased it to 60 but the bug is still there.

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

8 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

rigidbody 2d goes through polygon collider 2D 0 Answers

How can I detect collision with a text mesh without manually creating a polygon collider? 3 Answers

3d ground for 2d gameplay / side scroller 1 Answer

Distance-based collision detection not accurate 1 Answer

Detect Collisions with Object following Mouse Movement 2 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