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 swampman860912 · Jul 01, 2015 at 10:25 AM · physics2d

Circle colliders and polygon colliders

Hello,

so i have my character of my game which has a 2D circle collider and i have an ememy that has a polygon collider. When they collide nothing happens. The enemy has a unique shape and cannot have a circle collider, but when i change it to a circle collider everything works fine. What am i doing wrong here can these two physics objects interact with each other?

thanks, swampman

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 swampman860912 · Jul 01, 2015 at 12:41 PM 0
Share

LaneFox,

They both have Rigidbodies2D and neither of them are $$anonymous$$inematic. When I say nothing happens I mean they do not collide with each other. This is just because one has a circle collider and the other has a polygon collider. If i make them both circle colliders everything works as its supposed too.

Thanks, Swampman

avatar image LaneFox · Jul 01, 2015 at 12:51 PM 0
Share

Hmm, well thats not normal. Is this with a drop test where the objects drop via gravity or are you manipulating them somehow?

avatar image swampman860912 · Jul 01, 2015 at 12:57 PM 0
Share

I fixed it. I just decided to go with another circle collider. It was basically a fish jumping out of the water trying to eat a bug. I decided I didn't want the whole fish to be a collider just the mouth. So I set up a small circle collider inside of the mouth of the fish and it works fine now. This accomplished what I wanted to do.

Thanks for the quick response though, Swamp$$anonymous$$an

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by LaneFox · Jul 01, 2015 at 11:29 AM

Can you clarify what you mean by "nothing happens"?

If the objects have Rigidbodies and Colliders then physics should push them apart (if you didn't make them Kinematic). However if they do not have Rigidbodies then they are allowed to overlap without issue.

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
0

Answer by sansol · Jul 01, 2015 at 03:34 PM

hi there,

just fyi, i have had the same issue, and found out that colliders behave different when they have "depressions". i try to explain: a collider with an "O" shape will collide just fine, but one with a "C" shape would not, since it goes inside itself.. hope i'm making some sense? :-s

that btw happened to me in both 2d and 3d.

and the solution, as you already did, is simplifying your collider. either as you did to a basic shape OR just by taking away the "depression" (in the previous example the solution would be some kind of flipped "D" shape, where we close the entry the "C" shape has.)

hope i made myself understandable and you can use in the future.

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

How can I make a sprite object rotate to face another object using angularVelocity? 1 Answer

Raycast 2D hits sprite with collider, but returns error when not hitting any collider 2 Answers

Physics2D.OverlapAreaAll/NoAlloc fails detecting object in puzzling manner 1 Answer

2D Roly-Poly 1 Answer

Simulate rotation using two force thrusters 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