Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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
3
Question by CalebFnord · Sep 29, 2014 at 01:41 PM · rigidbody2dphysics2dhingejoint2d

Hingejoint2D's anchor pushed away from connected anchor

I have a rigidbody2d with a hingejoint2d connected to it and nothing else, so as to "pin" the rigidbody and have it rotate around a fixed point.

This works ok, unless there are other rigidbodies resting on the hinged one. In that case, the hinge connected anchor is slowly drifting away from the anchor, and cannot seem to hold the weight of the rigidbodies resting on it.

Is there a way to prevent the anchors from separating and making a firmly pinned rigidbody rotate around the hinge?

All the rigidbodies have a mass of 100, Gravity Scale is 50 and gravity is 20.

Thanks!

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

4 Replies

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

Answer by CalebFnord · Sep 30, 2014 at 07:42 AM

Eventually solved by setting the mass of the carrying object to a high value (I used 1000), and the resting objects to a low value (used 1).

The hinge is now firmly holding the carrying object and all the objects resting upon without visibly moving (there is a slight movement apparent in the object's transform).

If both the carrier and the objects being held have the same mass, whatever the value, the issue recurs.

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

Answer by patrusfarr · Aug 12, 2016 at 02:39 PM

I had a similar problem with two Rigidbody2Ds connected by hinge joint where if the transform.position of the connected Rigidbody2D was changed via script, the connected anchor would drift during run-time. I fixed this by turning off auto set for connected anchor point in the inspector of the Hinge joint. This must be a bug because I would think the anchor points should not change on their own.

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

Answer by infernobirdy · Dec 13, 2014 at 05:56 PM

You need to activate the "IsKinematic" value in the carrying RigidBody.

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 CalebFnord · Dec 14, 2014 at 08:05 AM 0
Share

This is not a matter of 2 rigidbodies hinged together, it is a single Rigidbody with a hinge, producing the effect that it is hinged to the background.

avatar image
0

Answer by aneedham0577 · Apr 16, 2021 at 07:44 PM

Go into Project setting --> Physics2D and set Default Connect Offset to the lowest it can go. This fixed it for me.alt text


oooo.png (73.5 kB)
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

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

Related Questions

Creating a simple swinging vine/rope/line 0 Answers

Create a simple constantly swinging vine/rope 1 Answer

Unity 2d Physics Collision Jumping / Glitching 0 Answers

How to check place on empty for placement polygon Rigidbody2d? 0 Answers

Rotating child object in compound collider 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