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 Detinator10 · Jun 25, 2014 at 07:40 PM · colliderrigidbody2dplatformer

Why do sprites stick to each other?

I am making a 2D platformer and I've run into a problem: When my character jumps into a wall and you keep him moving against it he is supposed to fall down, however, he actually sticks there and can hang indefinitely as long as you keep moving the character against the wall. I think this has something to do with friction mechanics in the physics engine. It should also be noted that the character in my game can move in the air while jumping (similar to Super Mario and other 2D platformers) so he only sticks when you're holding the button to move him in the direction of the wall. So is this a matter of lowering friction (and how would i do that) or is this something else? Thank You!

Comment
Add comment
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 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by maikonfarias · Jun 25, 2014 at 10:01 PM

If you are using the standard 2d character controller, you can add the Slippery material to the Box Collider 2D in walls.

If you can't find the materials for colliders, here is the one I am using: http://maikonfarias.com/unity/samples/Slippery.physicsMaterial2D

  • Download Slippery.physicsMaterial2D file and import to unity.

  • put it in the "Material" property of a Collider 2D for your walls.

Comment
Add comment · Show 2 · 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 Detinator10 · Jun 26, 2014 at 02:30 AM 1
Share

I ended up not using the code you were using and ins$$anonymous$$d I went to Assets > Create > Physics$$anonymous$$aterial2D and simply changed the friction variable to 0 from the inspector. Great answer anyway though.

avatar image satyagames · Sep 26, 2014 at 11:55 AM 0
Share

I changed physics$$anonymous$$aterial2D friction variable to 0 from the inspector and apply to wall as well as character.

Still character strucks while jumping between walls ( if character collider touches the wall collider edge)

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

2D character controller getting stuck on walls 5 Answers

Triggering platform animation on colliding with Button 0 Answers

2D Character Movement Collision Problem 0 Answers

How to add knockback to a player and when releasing the joystick not stopping knockback force 2 Answers

Drag Player Object using Physics 2D 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