Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Let us know your feedback about the Global Illumination changes in the 2023.2 beta.
    Dismiss Notice
  3. Dismiss Notice

Constrained HingeJoint bug in Unity5b16 [FIXED in b17]

Discussion in 'Unity 5 Pre-order Beta' started by Capn_Andy, Dec 10, 2014.

  1. Capn_Andy

    Capn_Andy

    Joined:
    Nov 20, 2013
    Posts:
    80
    I'm running into trouble with a hingeJoint! It works great if the rigidbody of the connected item is unconstrained, but as soon as I put constraints on it (any combination of x / y / z, position or rotation) it starts jittering and glitching. Is anyone else seeing this or is it the way I've coded it up?
     
  2. Capn_Andy

    Capn_Andy

    Joined:
    Nov 20, 2013
    Posts:
    80
    Curious further thoughts; here's a step by step:

    - Instantiate two gameobjects in the world, each with a box collider, and constrained Z motion and X/Y rotation.
    - Programatically configure a hinge joint and connected the two boxes.
    - Movement of one box will result in jitters and glitchiness; both boxes will launch off into space.

    If I pause the editor right after making the hinge, and manually de-select the constraints on the grabbed object, it seems to move fine, however, if I programatically set the RigidbodyConstraints to .None during the creation of the hinge joint the original behaviour persists.

    I think the physics engine isn't properly updating the state when using programatic designs?

    (Same setup works great in 4.6.1)
     
  3. Capn_Andy

    Capn_Andy

    Joined:
    Nov 20, 2013
    Posts:
    80
    Fixed in Beta17. Thanks!
     
    Roni92 likes this.