• 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
Question by borispavlov0 · Jun 04, 2015 at 02:40 PM · unity 5rigidbodyhingejoint

Unity hinge joint jitter when target gameObject parent is moving

I have a player car game object that moves forward with the following script:

     float step = speed * Time.deltaTime;
     transform.position = Vector3.MoveTowards(transform.position, targetPosition, step);

Inside this game object I have a child called Body and inside it another child called Neck Joint.

I would like to make a Bobble Head attached to my car object, more specifically to the Neck Joint. I have attached a head object with a hinge joint that works very well when the car is steering left/right (or rather when I swing the Body's local position left/right). The hinge joint's axis is in the z-direction and it has a spring setting.

My problem is when I move the parent player object with the above formula, the head seems extremely jittery in the z-axis. The left right swing works fine as per the hinge joint axis, but when my movement is in the direction of the hinge joint axis, I get really weird jitter as though the hinge joint is trying to catch up to the object.

I tried setting the physics iteration count to 100 and still the same issue.

Sorry if I am not clear, ask away if you didn't understand anything. And thanks for the help!

Comment

People who like this

0 Show 0
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

Answer by barbe63 · Jun 04, 2015 at 07:46 PM

First you should try to move the rigidbody instead of the transform in a FixedUpdate. Then maybe try to tweak the hinge swings limit.http://docs.unity3d.com/Manual/class-CharacterJoint.html

Comment

People who like this

0 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 borispavlov0 · Jun 04, 2015 at 07:49 PM 0
Share

I am trying to keep with the transform movement. I the movement is restricted on a track and I found this to work best by playing with the transform instead. I was unable to get it to work with RB

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Hinge Joints Twisting around Wrong Axis 0 Answers

hing joint issue,Hing Joint Issue in tow truck 0 Answers

Ball getting stuck in surfaces and bouncing for no reason? Help! 0 Answers

How can I rotate my camera when player has rigidbody? 0 Answers

Angular Velocity is causing object to spin out of control 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