Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Trying to make a simple door

Discussion in 'XR Interaction Toolkit and Input' started by ixmas93, Oct 15, 2020.

  1. ixmas93

    ixmas93

    Joined:
    Mar 16, 2020
    Posts:
    8
    Hello everyone, I need your help. I've been trying to make a door in my VR game for several days using Unity's hinge joints, and although it seems to work, it has several problems that I can't solve.



    Jittering:
    If the player decides to take the door handle and walk away from the door without releasing it, the door will go crazy until they decide to release it. It doesn't matter that the Break Force parameter is infinite, it breaks anyway.

    Possible solution:
    When the player reaches a certain distance, make him release the door. Although this should be done anyway, I would like to know why the gate moves out of bounds even when it has been configured not to.

    I can push it inside the walls:
    For some reason, although the hige joint marks the limits, the player's body can push the door and push it inside the walls, moving it quite a distance.

    Possible solution:
    I have tried to make the rigidbody of the door kinematic, but when the player grabs the door it can still cause the error.
    I have tried to freeze the XYZ positions and the X and Z rotations of the rigidbody constraint so that the door could not move anywhere and only rotated in Y, but for some reason it does not work, when I take the door handle the door does not does it move.

    I have tried using configurable joints to solve both problems and although I am not sure if I have configured it correctly, the player could still remove the door and put it inside the walls.

    I am attaching a video so that you can better see my problem and an image with the configuration of the door. I would greatly appreciate any kind of help, because I am really lost and I cannot find any solution.

    Thank you very much in advance.
     

    Attached Files:

  2. cgaunce

    cgaunce

    Joined:
    Feb 27, 2018
    Posts:
    5
    I went through the door creation process myself recently and followed the tutorial below. It worked well.
     
    TheReplicant likes this.