Search Unity

Question Configurable joint gets blocked in Oculus (could be a bug)

Discussion in 'VR' started by JofreMP, Feb 3, 2023.

  1. JofreMP

    JofreMP

    Joined:
    Sep 20, 2019
    Posts:
    8
    Hi everyone!

    I'm developing an application on Oculus VR, that's about security formation for a company.
    I've been trying to solve a problem during this week but I didn't find a solution.

    The problem comes with a door behaviour, that it has a latch. First I ask for access by pressing a button, that works properly. When the access variable is "true", then I'm able to grab the latch and slide it into its final position, then I can open the door.
    The problem is with the latch. When you slide it to the "OPEN" position and the door is closed, I can't close the latch anymore, unless the door is open. There is no condition that blocks the latch on that position, so my conclusion is that the problem comes with the rigidbody or the configurable joint.

    I did a debug to all the variables that can affect to the rigidbody, as the kinematic, constraints, the grabbable object, etc., but everything is set up as it should.

    The latch is on its own physics layer, so it does not collide with anything except with the player hands.
    upload_2023-2-3_11-46-0.png
    As you can see, it has no constraints nor isKinematic.
    upload_2023-2-3_11-49-31.png
    When I change it to "OPEN" position nothing changes, theoretically. When is in this position and I grab de latch, the variable isGrabbed is set on true, so it's grabbed but not following the physics.

    Someone has an idea why this could be happening? As I said, I think it's a problem with the configurable joint and the preprocessing, that is ignoring the constraints, but I don't know how to solve it.

    Thanks in advance.
     

    Attached Files:

  2. JofreMP

    JofreMP

    Joined:
    Sep 20, 2019
    Posts:
    8
    Hi,

    I just want to add more information about this problem. This latch is inside a door (with its rigidbody, hinge joint, etc.) and it has a box called "ManetaBox", with just a Mesh and a Kinematic Rigidbody. As you can see, is the connected rigidbody of the latch, because I wanted the latch to follow a body with no physics interactions.
    upload_2023-2-3_12-18-52.png
    The grabbable handler of the latch is a child of the game object, and it looks like this:
    upload_2023-2-3_12-20-18.png
    upload_2023-2-3_12-20-55.png
    It has this script, that is inherited from OVRGrabbable.
     
  3. nilagard

    nilagard

    Joined:
    Jan 13, 2017
    Posts:
    77
    Using configurable joints and setting them up is EXTREMELY janky unless done with 100% precision. That is all I can say about this, good luck getting it right for your project, as there is no quick fix to this without going through your project and debugging your setup. Try to see if someone has any detailed explanation and guides on how to use configjoints.
     
  4. JofreMP

    JofreMP

    Joined:
    Sep 20, 2019
    Posts:
    8
    Thanks for you answer. I'll try to configure it with more precision and try it as many times as it needs.