Search Unity

How to Change the initial Hand Color of the Oculus Touch for a project

Discussion in 'AR/VR (XR) Discussion' started by narabuster, Aug 22, 2018.

  1. narabuster

    narabuster

    Joined:
    Aug 22, 2018
    Posts:
    1
    Hi. I'm currently in the process of making my first VR game within Unity 2018.2 and the latest version of the Oculus Avatar utilities. For my game, I want the hand color of the Oculus Touch controllers to be black instead of the default semi-transparent blue. After experimenting with the scripts for rendering the OVR Avatar hand components, nothing seemed to work.

    Initially, I was following an online solution that involved hard-coding in a material setColor() in the UpdateAvatarMaterial() method, which is contained in OvrAvatarRenderComponent.cs. It can be found here: https://forums.oculusvr.com/develop...nd-color-during-gameplay-updateavatarmaterial

    However, on my version of the SDK, it seems that the same script deprecated that method, and I'm unable to find it anywhere else among the OVRAvatar Materials folder.

    I tried changing the _BaseColor component in some of the OVR shaders, and tried to mess with the CreateAvatarMaterial() method in OvrAvatarRenderComponent.cs by using the setColor method there (i.e. mat.setColor("_BaseColor", Color.black)), but none of these changes seem to be reflected whenever I playtest. The color remains a semi-transparent blue.

    I may be missing something very obvious in terms of changing the color, but on my version of the SDK and Unity, how can you now change the hand color of the Oculus Touch within the render component scripts?