• 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
8
Question by aristaios · Jan 05, 2014 at 05:41 PM · 2dcollisionphysicscollidersfixedupdate

2D Collider aren't exact?

I have a character with a Rigidbody2D and I am moving him in the FixedUpdate method by adding forces. Yet it seems that he sometimes get stuck on a "ledge" were technically no ledge is. He has a BoxCollider2D as well a the ground.

You can clearly see the collider aren't touching yet the physics engine leaves him stuck there! The ground boxes are perfectly aligned via vertex snapping and the character started a bit above the ground to prevent him from going inside there.

Failing Colliders

What can I do to prevent this from happening? I mean sure I could implement a jump, but who would want to jump over a ledge on a seemingly flat surface?

Thanks in advance!

fail.png (4.6 kB)
Comment
Add comment · Show 11
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 aristaios · Jan 05, 2014 at 06:40 PM 0
Share

Should I file a bug report in the issue tracker?

avatar image fafase · Jan 05, 2014 at 06:44 PM 0
Share

We only see the collider of that object, and it is way bigger than the actual object. What about the collider it is colliding with? Are you sure it is exactly the shape of the other objects?

avatar image aristaios · Jan 06, 2014 at 02:30 PM 0
Share

It isn't bigger; I unfortunately took the screenshot during the animation. The collider in the top right is a good bit smaller than the sprite and the collider it seems colliding with is seen as the green lines in the bottom left. There is quite a gap between those.

avatar image aristaios · Jan 07, 2014 at 09:57 PM 0
Share

So any ideas on this?

avatar image aristaios · Jan 08, 2014 at 02:58 PM 1
Share

Here is a screenshot of what I was able to reproduce: reproduced Also there is a download for the project in which this occurs: http://www.filedropper.com/newunityproject. Just unzip it, open it, click play and then move the top quad to the right. You will see it gets stuck on a non-existant ledge.

reproduced.png (10.6 kB)
Show more comments

6 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Odalmer · Sep 28, 2020 at 10:48 AM

I have the same error, please help me

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
  • ‹
  • 1
  • 2

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

28 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 avatar image avatar image avatar image avatar image avatar image

Related Questions

Is there a solution to when colliders bypass? 2 Answers

Size and Position of BoxCollider 2 Answers

Prefab instantiated by code, collision does not work 0 Answers

Script calling onCollisionEnter2D and onTriggerEnter2D while disabled 1 Answer

GameObject not colliding while grabbed in VR 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