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 binux · Oct 14, 2014 at 02:28 PM · physics2dissuefrictionslip

How to make Physics2D more "stable"

Hello, I'm currently developing a simple tower game where you have to stack different 2D sprites(rigibody2D) on top of each other and prevent them from collapsing. It works pretty well though I have one basic problem:

Once I stack different sprites on top of each other (in the game) they start to awfully wiggle and then slip away (as seen on the picture below). I tried to solve it with a high friction 2D material, but it didn't help. The collision detection is set to "continous" since I'm dragging the objects with my mouse.

Does anyone have a good idea how to prevent the objects from slipping away too easily?

Thanks for any help!!

screen.png (28.5 kB)
Comment
Add comment · Show 8
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 MrSoad · Oct 14, 2014 at 02:55 PM 0
Share

Not sure you need to have "Continuous" on...? Have you tried playing with the gravity setting in project settings? This may help(reduce it). Have all your objects got the high friction $$anonymous$$aterial on them, and have you altered all the Physical $$anonymous$$aterial settings to max friction. Also try changing the mass of your blocks in the rigidbody settings. And the interpolate settings as well... Let me know if any of this helps, I will try to think of something else if not.

avatar image binux · Oct 14, 2014 at 03:31 PM 0
Share

I need continous collision detection. Otherwise while I drag the object it won't properly collide with other objects that are already in scene.

Neither of it helped. With higher gravity the objects directly slipped of the surface (to the right side). Tried to manipulate the sleep time but that didn't work either. Could it be that the flat surface of the ground object is causing the troubles?

avatar image binux · Oct 14, 2014 at 03:36 PM 0
Share

I now increased the linear drag of the rigidbody which seems to $$anonymous$$imze the problem. It will slow down the fall of object though, but I guess I'll better have a slow falling object than a collapsing tower.. ;)

avatar image MrSoad · Oct 14, 2014 at 03:57 PM 0
Share

I meant lower the gravity so that it is not pulling them down with as much force, sorry for the ambiguity. You could add a downwards force while in falling state to increase the fall speed, then end this force upon contact. Possibly with a damping anti fall force applied when contact is made to slow it down for resting nicely. Did you play with the $$anonymous$$ass of the objects, this can make a big difference sometimes without having to alter gravity.

You normally only need continuous when objects are moving very fast to stop them passing through other objects. $$anonymous$$aybe your drag does need this but in general it is used for fast moving projectiles.

I had forgotten about drag(Doh!), you can change the drag value of your block upon contact, ramp it up. Then when no contact reduce it back to 0.

avatar image binux · Oct 14, 2014 at 04:07 PM 0
Share

It does help a bit. but the more objects are on top (> 3), the faster it starts to slip out. Can I maybe somehow ignore collision up to a specific amount?

Show more comments

0 Replies

· Add your reply
  • Sort: 

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

Remove Drag/Friction 1 Answer

Changing friction from code not working (2D) 2 Answers

sharedmaterial.fricion behaivior in actual game 0 Answers

Modify friction behavior on Physics 2D Material 1 Answer

Objects Phasing in eachother (2d) please help 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