• 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
2
Question by Leos924 · Dec 06, 2017 at 04:30 PM · physicsrigidbodyjoints

Make connected rigidbody pull "parent" rigidbody with joint

Is there any way I can make a connected rigidbody of a joint pull the rigidbody that has the joint?


Here is a GIF of what I want to accomplish

Behaviour


I need to make a sort of elevator pushed by pistons, so, my first approach was to use several joints and kinematic rigidbodies with a script, everything worked fine but one thing, if I tried to move the kinematic rigidbodies into a static collider they would just go through as they wouldn't have any sort of collision detection like the one non-kinematic rbs have

Then I tried to make a hierarchy of joints with non-kinematic rbs connected on each level, but it just didn't work

So now,I think the best approach might be using a fake collider that just scales to fake the pistons pushing an elevator, but as you can see in the GIF the child doesn't apply any pull force or any torque to the joint because it's a rigidbody with it's own velocity and params, so...


What should I do to make a physics model where a parent and child has 2 way connection but still remain somewhat independient (The parent moves the child but the child also applies force to the parent using its own force like a real joint would work on a non static parent)


Any guidance is appreciated :)

animation-3.gif (225.8 kB)
Comment
Add comment · Show 4
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 nt314p · Dec 07, 2017 at 12:51 AM 0
Share

Whats wrong with having the child as a collider?

avatar image Leos924 nt314p · Dec 07, 2017 at 02:34 PM 0
Share

As I need to make an elevator, I need the physics model to be very very accurate, so, if the elevator is a child collider of the main transport object, if I move the child collider it will not update the main object velocity or torque because it's part of the Rigidbody the parent has, so, the only way of having the elevator to have its own values is making it a Rigidbody

And if you ask why I need the collider to update velocity and torque, it's because otherwise the physics engine will not calculate any friction or bounciness on the objects as it will read from the rb that the velocity is 0 and the torque is also 0, for example, if you move a kinematic rigibody ( without Rigidbody.$$anonymous$$ovePosition and Rigidbody.$$anonymous$$oveRotation to keep the velocity and torque at 0 ) with a non-kinematic rigidbody sitting on top, you'll see that the object on top will just slide no matter how you move your kinematic body

Hope this makes my question more clear :)

avatar image jchester07 · Dec 07, 2017 at 01:12 AM 0
Share

Do you need to keep their hierarchy as parent and child gameobjects?

avatar image Leos924 jchester07 · Dec 07, 2017 at 02:38 PM 0
Share

No, I only need the group of gameobjects to make sense, it doesn't matter if the objects are separated or in hierarchy, I only refered to the objects as child and parent in my question because that's somewhat how the joints work given this circumstances ( Where the child can't control the parent behaviour on it's own but the parent can do control the child behaviour )

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.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

141 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 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 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 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 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

Connect rigidbody to another moving rigidbody to simulate a hanging weight 0 Answers

What is the best way to create a balance board? 1 Answer

Getting a ball to settle between two points. 1 Answer

Is it possible to critically damp the built in physics joints? 0 Answers

Can an ArticulationBody be joined to a Rigidbody? 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