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 rastating · Jan 11, 2014 at 09:04 PM · 2dphysicshingejointropebridge

Using HingeJoint2D to Join Objects at Specific Points

My end goal is to create a rope bridge similar to what can be seen in the picture below, which is built from a number of different planks, which when walking over will apply a downwards force and cause more curvature at the point of pressure.

I have been trying to achieve this using the Hinge Joint 2D components, however my attempts have all failed so far, and I am wondering if there is a better component to be using to achieve this or not.

Any advice on how best to approach this would be much appreciated. Thanks!

alt text

sonic_the_hedgehog_(8-bit)_gameplay[1].png (3.2 kB)
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

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by rastating · Jan 12, 2014 at 02:02 PM

I fixed this in the end using the Hinge Joint 2D components by having two kinematic rigidbodies at both ends of the bridge and then linking each one to the one to the left of it (leaving the starting one without a connected rigidbody). After doing that I altered the anchors to ensure they were always at the end of the bridge piece rather than in the middle (this is where I was going wrong all along).

Comment
Add comment · Show 5 · 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 GameVortex · Jan 13, 2014 at 08:23 AM 0
Share

Sorry, I became somewhat occupied. Glad you got it to work. =)

avatar image rastating · Jan 13, 2014 at 01:37 PM 0
Share

No problem, thanks for offering your assistance anyway, I appreciate it :)

avatar image GameVortex · Jan 13, 2014 at 01:55 PM 0
Share

Remember to mark your question as answered as well. =)

avatar image rastating · Jan 17, 2014 at 12:16 AM 0
Share

I have tried but it says there is already an accepted answer and won't let me :(

avatar image CyberMew · Mar 11, 2014 at 06:40 AM 0
Share

Ins$$anonymous$$d of setting the ends to is$$anonymous$$inetic, I duplicate the ends (i.e. extended it), remove Colliders and SpriteRenderers, set it to is$$anonymous$$inemtic, so that we can move the real ends around and still have the 2 "visible" ends react to physics accordingly.

avatar image
0

Answer by GameVortex · Jan 11, 2014 at 09:08 PM

Hinge Joints are mostly for rotation. What you want is the **Spring Joint** which acts as a spring between rigidbodies. Connect one between all your objects and tweak the dampening and distance until the desired effect is achieved. You probably want the distance pretty small so the springs can't be stretched too far.

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 rastating · Jan 11, 2014 at 10:26 PM 0
Share

Hey, thanks for the response! I've been playing with the Spring Joint and I think it is definitely a step in the right direction, but it seems the joint is always formed in the centre of my game objects, regardless of how I am tweaking the anchor points in attempts to make each plank join on the left and right hand sides of one another. Have you got any advice on what I may be doing wrong?

avatar image lh7746 · Jan 25, 2015 at 12:04 PM 0
Share

you have to adjust the pivot point in the sprite renderer

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

20 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

Related Questions

2D swinging physics. 0 Answers

Creating a rope using skinned mesh renderer 1 Answer

How do I make the length of my rope shorter 1 Answer

How do you make an wire/rope type object and attach to 2 separate objects 1 Answer

Can't get a 2d chain to work using hinge joints. 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