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 Prevent looking through walls: Two scenes, same rigs, one works, one doesn't.

Discussion in 'XR Interaction Toolkit and Input' started by PenProd, Jun 27, 2023.

  1. PenProd

    PenProd

    Joined:
    Dec 17, 2022
    Posts:
    150
    I have a project with several scenes. In all my scenes I used this to prevent players from looking through walls:

    This works on all scenes except one. And for the life of me, I can't find why not. The XR Rig in the non-working scene is a direct copy of the XR Rig in any of the other scenes. One thing I do notice however, is that on the scenes where it works, I see the character's capsule-shaped collider move with the VR headset. In the scene where it doesn't work, the collider doesn't move - ever. I've compared all component settings of the XR Rigs and I see no difference whatsoever (see below).

    So what could be causing the collider to stay stationary?

    upload_2023-6-27_12-35-16.png
    upload_2023-6-27_12-36-5.png
    upload_2023-6-27_12-36-49.png
     
  2. PenProd

    PenProd

    Joined:
    Dec 17, 2022
    Posts:
    150
    Found it. Apparently, under the Character Controller Driver, the Locomotion Provider was set to the Turn provider, not the Move provider. The screenshot above was from the correct scene, not the one with the error.