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 AlexK · Mar 14, 2011 at 06:26 PM · physicsrigidbodyjointhinge

Hinge Joints, distance to connected body

I have a kinematic rigidbody (let's call it A for simplicity) controlled via transform and a regular rigidbody (lets call it B) controlled by physics. A hinge joint is attached to B, and A is specified as connected body. The obvious intention is as A moves (sometimes in a very abrupt manner) B should follow it. At the same time, B's rotation is unrestricted, hopefully creating a "ball and chain" effect. So it does, but the distance between A and B's anchor seems to be somewhat arbitrary. Sometimes B flies real far away from A, sometimes it gets pretty close. I tried it with and without a spring with more or less the same effect. Is there any way to control the distance to connected body ?

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
1

Answer by e-bonneville · Mar 14, 2011 at 07:35 PM

It depends on the strength of the spring. A higher strength results in a smaller distance from A to B. However, the distance which A is moved affects the "recoil" of B. For example, if you move A ten units away from B and the strength of the spring is 1, then B will fly towards A with a velocity of 5, decreasing until B reaches A. Momentum will push B past A 3 meters.

However, if A moves 30 units, then B will fly towards A with a velocity of 15 units/second. It will be pushed past A 10 units, thus resulting in the larger distance you described.

There's really no way to fix this, as it is resultant of Unity's physics system. You'll have to try a different method. Have a look at the camera follow script packaged with Unity if you're looking for a smooth follow system.

Please note that the values given are relative to each other only and do not reflect real values within Unity

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 AlexK · Mar 15, 2011 at 03:03 AM 0
Share

Thanks for your answer Elliot. Do you think a different joint type will work better, configurable joint or spring joint maybe ?

avatar image e-bonneville · Mar 15, 2011 at 10:52 AM 0
Share

Sadly, no, as all of Unity's joints behave the same way. If you want B to follow A smoothly, you'll have to look into writing your own system.

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

No one has followed this question yet.

Related Questions

Hinge Joint? Unconstrained. 1 Answer

Why are my hinge joints inaccurate? 1 Answer

Truck-Trailer Hinge Joint 0 Answers

Configurable Joint just falls apart? 1 Answer

Configure configurableJoint to act as the disctontinued driveJoint 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