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 Default117 · Feb 03, 2012 at 03:01 AM · physicsropehinge joint

Using hinge joints for rope

Hey,

At the moment i have a series of planes set up in a straight line with hinges attached to them. This all works fine. What i'm also doing is i have a collider on the last plane which i can then click on and drag around. When it gets dragged i simply set the position of the gameobject to the worldspace position of the mouse coordinates. This causes all the hinges to react to it and bend around like a 2D rope. The issue is that i can pull the thing apart by moving the last gameobject to quickly and too far away.

Is there a better way to manipulate this without breaking all the constraints of the hinge joints?

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 Bicko · Feb 03, 2012 at 11:32 AM

I assume your Break Force/Torque are set to infinity so it'll never break (in theory)? I'd suggest that you Vector3.Lerp the position of the end point towards the mouse point, rather than just snapping it straight-to.. that might fix your problem.

You could also perform a Vector3.Distance to see how far away from the start point the end point currently is, and if it's beyond a certain amount then stop the end point trying to get to the mouse.

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 Default117 · Feb 03, 2012 at 01:44 PM 0
Share

That is correct i kept them at infinity since i didnt want them to break at all. I'll attempt to lerp the position ins$$anonymous$$d of snapping it when i get back into work, thanks for the suggestion. Completely forgot about lerping it. I'm actually already doing a distance check between the start and mouse and telling it to "let go" as soon as it exceeds this distance. But even then if you move the mouse quick enough it $$anonymous$$rs apart (then snaps back when you let go again). So yeah, basically to reiterate and recollect my thoughts - i want the rope to act exactly the same way when i physically manipulate it to when it simply simulates with no manipulation. (keep limitations and make them stay together).

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Is it possible to make a realistic rope using the interactive cloth? 0 Answers

Hinge Joint not Arcing 0 Answers

Hanging Onto A Rope 0 Answers

Is there any way I can move a hinge joint around the stage? 0 Answers

Grapple and swing/pull mechanic 2 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