• 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 yous · Jul 03, 2012 at 08:41 PM · physics

Hinge Joint : moving anchor and constraining position not working togehter

Hello,

I've been trying to create Saloon style swinging doors using the Hinge Joint feature, and I've run into several problems.

  • create a box object and assigned a hinge joint to it. I set the axis to Y only , and set the anchor on x -.5 so it swings from the far left

    • If I run into the door, it swings properly, but if the hinge is touched slightly, or the door is approached at the wrong angle, the hinge rips off the axis for a few frames and snaps back quickly into positon (undesirable)

    • to prevent this I've added "positonal and rotational constraints" . In the rigid body freezing position on X/Y/Z and freezing Rotation of X/Z

    • Now when I run into the door I get very odd behavior, where it flickers for a few frames but tries to be static, as if it doesnot accept that I left Y rotation open. If i turn off the constraints the door swings again from the hinge, but i still have that problem where it rips off the axis.

    • Here is the odd part, after experimenting I found If I do all the above steps, WITHOUT moving the AXIS from 0 to x-.5 (keeping it centered) but still freezing the position rotation, everything works.. The door swings in Y, the constraints keep the door on the hinge perfectly, except my doors swing from the middle which is not the effect I need.

I considered trying to use it like this, and parent the art so that the edge of the renderable door lines up with the middle of the collision Cube object, except this cheat is not a good solution because when the door is open there will be invisible collision poking out the back half of the door.

Does anyone have a solution? or an idea why the change in AXIS in the hinge and the Constraint on the rigid body dont seem to work together, and if there is a reasonable work around?

Thanks

*EDIT Measurements are 3 x 3 x .2 Units, and the mass is 1

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

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

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

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

2D 360 degress platformer example needed 0 Answers

Can I make physics engine speed dependent on frame rate? 2 Answers

OnCollision events are not always fired 2 Answers

Rigidbodies get huge amount of velocity when clipping into other Rigidbodies 2 Answers

Need help moving player object towards an instantiated ball 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