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. Dismiss Notice

Question Collisions problem in VR

Discussion in 'VR' started by EnriqueMM, Mar 2, 2022.

  1. EnriqueMM

    EnriqueMM

    Joined:
    Feb 15, 2022
    Posts:
    9
    Good morning everyone, I am trying to make an application in VR (using oculus quest 2) in which the user carries a cane. The controller has to vibrate every time the user hits a wall or object.

    The problem is that I can't get it, when I hit a wall the stick goes through it.
    Expectation:

    Reality:


    I have tried to use the Rigidbody component in the walls and in the stick a configurable joint, but when I hit it they move, I tried to activate the isKinematic option but I don't get anything. I don't know if I have configured the rigidbody wrong on the objects or on the cane.

    I attach some pictures with the components. It is the first time that I post a doubt about Unity so if I miss something let me know.

    Thank you very much in advance ^^

    Cube:


    Cane:
     
  2. adamgffrd

    adamgffrd

    Joined:
    Sep 26, 2018
    Posts:
    35
    I would change the cube and the cane to Continuous Dynamic. If the configurable joint doesn't give you any... give, then check the spring Position Damper setting.

    As it stands now, if you swing the cane while it's in your hand, does it sway at all? If not then it's probably too rigid or doesn't have enough give.
     
  3. EnriqueMM

    EnriqueMM

    Joined:
    Feb 15, 2022
    Posts:
    9
    It does not swing at all, in the end what I did was to add the stick to the user's control, so that he always carries it. I have managed to give feedback to the user when hitting objects, but it still goes through the walls.