Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 martijnvanginkel · Aug 25, 2016 at 11:38 AM · collisionrigidbody2dcollider2dboxcollider2doverlapping

2DColliders going through eachother

Hi. I'm making a game where a guy needs to move blocks by bumping into them. I gave the blocks and the player a 2D boxcollider and I gave an empty object a collider to prevent everything from falling off the screen. Now when I move my player, the block-colliders are going through each other. I want the blocks to be 'stronger' so they won't overlap. I gave the blocks a rigidbody too. I know this problem with colliders has been asked a lot but I don't know how to fix this.alt text

Look at the pictures below if my question is unclear

schermafbeelding-2016-08-24-om-212915.png (49.8 kB)
schermafbeelding-2016-08-24-om-213012.png (82.6 kB)
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 mlavik1 · Aug 29, 2016 at 07:03 PM 1
Share

I'd like to help, but I'm not sure if I understood the problem... But let me try: You have two GameObjects which both have a Rigidbody2D and a BoxCollider2D. And when you move one of them towards the other, the colliders have no effect at all? They just pass through?

If that is the case, then:

  • Do both GameObjects have a Rigidbody2D?

  • Do any of the GameObjects' BoxCollider2D have "Is Trigger" checked? This will disable collisions, and ins$$anonymous$$d call the OnTrigger()-method in the scripts.

  • Do any of the GameObjects' Rigidbody2D have "Is $$anonymous$$inematic" checked? A kinematic object will not be physically affected by collisions.

avatar image martijnvanginkel mlavik1 · Sep 05, 2016 at 11:47 AM 0
Share

Hi mlavik,

Sorry for responding so late. I didn't have access to internet for a couple days. I have 2 GameObjects. both have a rigidbody2d and a boxcollider2d. When I push both of the gameobjects towards the edge of the level I want them to be solid, and not slide into eachother. Its kinda hard to explain so I made a little video of the problem:

https://www.dropbox.com/s/8d2v1q1xj23d1my/colliderproblem.mov?dl=0

Also the GameObjects are unchecked for triggers and $$anonymous$$inematic is also unchecked

avatar image Benjames · Sep 06, 2016 at 05:59 AM 0
Share

I do believe if you try to set transform of the gameobject ins$$anonymous$$d of using the rigidbody it may cause this.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by nsfnotthrowingaway · Jul 13, 2017 at 10:07 PM

Did you try setting the RigidBody collision detection type to continuous?

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

6 People are following this question.

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

Related Questions

Object passes through collider even when isTrigger is turned off. 2 Answers

Box Collider 2d don't collide 3 Answers

Object hits another but doesnt bounce off again. 0 Answers

Is there a way for 2D Box Colliders to ignore another? 4 Answers

Make colliding object not collide in overlapped area 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