Search Unity

Fixed Joint with Inertia Tensor

Discussion in 'Physics for ECS' started by argibaltzi, Oct 14, 2020.

  1. argibaltzi

    argibaltzi

    Joined:
    Nov 13, 2014
    Posts:
    220
    Hi

    EXAMPLE
    2 cubes on top of each other (similar to the RigidBody joint setup in the example)

    I am trying to get a simple fixed joint working with inertia tensor X and Y set to 0

    When i try with inertia tensor to ON the joint doesn't work very well anymore, it seems to fold and eventually the 2 cubes will be in same position.

    With no inertia tensor the 2 cubes always seem to be on top of each other and move together as one

    Any ideas?
     
  2. steveeHavok

    steveeHavok

    Joined:
    Mar 19, 2019
    Posts:
    481
    The Rigid Joint is working in 3D, however by setting the inverse inertia tensor in X and Y to 0 effectively stops the Joint from correcting the error.
    If you set only one body in the pair to have a tweaked inertia tensor the fixed joint should work.
    Alternatively, you can just a joint that focus on fewer axis (e.g. a limited hinge with zero limits) works are well.
    The best thing would be if you created your only Joint with a single angular Constraint atom that only worked on the remaining free axis of rotation.