• 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 Ash-Blue · May 19, 2015 at 05:03 AM · 2dunity 2d2d-platformer2d-physicsplatformer

Unity 2D player sticks on platform corners

Update: 2D Capsule colliders are coming in a future 5.x update. Keep your eyes peeled to the roadmap for more info https://unity3d.com/unity/roadmap

When my Unity 2D player (with a circle and box collider) jumps into a platforms corner at just the right angle. The player sticks in the corner as long as you keep applying forward force. This bug has been present in Unity for a long time and can be seen in Unity's official 2D platformer character tutorial if you jump into a platform at just the right angle. There must be a way around this bug, but I've been searching for a few months and haven't been able to find any good leads to fix it.

Video example demonstrating bug: https://www.dropbox.com/s/dmrbt8a0u9ufgn9/LedgeStickBug.mov?dl=0

Images with more details:

  • Debug snapshot of player sticking on corner when falling - Image

  • Debug snapshot of player sticking on corner when jumping into it - Image

  • My current physics settings - Image

  • Player physics details - Image

  • Platform physics details - Image

alt text

screenshot-2015-05-18-213359.png (16.1 kB)
Comment
Add comment · Show 2
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 yashpal · May 19, 2015 at 05:19 AM 0
Share

hello @Ash Blue,

I think you can solve this by using box collider instade of circle collider.

image

boxplayercontroller.png (3.2 kB)
avatar image Ash-Blue · May 19, 2015 at 05:34 AM 0
Share

The problem with a box collider solution is the player will stick to corners and uneven terrain. $$anonymous$$aking it a solution I wish I could use.

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by KoJix · May 19, 2015 at 06:46 AM

I believe this can be fixed with a physics2D object.

If you change the friction to 0, or just play around with the value.

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 Ash-Blue · May 19, 2015 at 10:20 AM 0
Share

Actually I tried that. Setting the friction to 0 actually doesn't do anything. From what I understand the issue seems to originate in box 2d's core. Since the circle is wedged between two corners, the physics resolution seems to be confused and trying to push it in two opposite directions. Causing a ghostlike square to wrap the circle.

avatar image
0

Answer by mr_noodler · Aug 01, 2020 at 08:32 PM

I have this same problem @Ash-Blue

Please follow me on twitter:) https://twitter.com/NoodlerMr

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

21 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

Related Questions

2D Platformer queries 1 Answer

Character animation jerks when moving 1 Answer

2D platformer - character clips into the ground 1 Answer

Moving platform player bounce when moving down 1 Answer

How do I stop my sprite from jumping in the air? 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