cancel
Showing results for 
Search instead for 
Did you mean: 

How to make an Oculus Touch button flash

Livealot
Protege
I'm using OVRAvatar to generate my hands/controllers. Since these are dynamically generated, I'm having trouble finding the references to the specific sub-component meshes (e.g., the A button, the left stick, the right trigger, etc) so I can light them up as needed.
1 ACCEPTED SOLUTION

Accepted Solutions

Livealot
Protege
I think I figured out the confusion. As MikeF says, OVRAvatar by itself doesn't have individual mesh components, so there's no easy way to make specific buttons flash. I assumed that was possible because my scene hierarchy included those sub-meshes, which are easy to color, but impossible to reference via OVRAvatar.

Here's my setup: my original LocalAvatar prefab came from SampleScenes/Hands/CustomControllers which includes modifiable prefabs for the left and right controller. Then I added OVRAvatar to the scene, and never guessed I actually had two pair of controllers running in the scene (the custom controller and the OVRAvatar dynamically generated one).

Fortunately, this also yields some simple workarounds for my original question until Oculus provides a simpler way to highlight the buttons. Option 1: just use custom controllers the entire time and do exactly what you want. Option 2: When you want to highlight buttons (like during a tutorial), just hide the default Avatar controller and show your custom controller.

View solution in original post

4 REPLIES 4

MikeF
Trustee
there are no individual mesh components unfortunately so you'l need to do highlighting via shader/mask setup

Livealot
Protege
To be more clear, I'm looking for a reference to the SkinnedMeshRenderer component of something like "lctrl:x_button_PLY" which is a child of the dynamically instantiated controller prefab

I can do this by brute force assignments post instantiation, but I was hoping for a more elegant script reference to the same object so I can just swap materials

MikeF
Trustee
How are you able to access individual mesh components through "brute force assignments"?
Its only one skinned mesh renderer with a hierarchy of joints

Livealot
Protege
I think I figured out the confusion. As MikeF says, OVRAvatar by itself doesn't have individual mesh components, so there's no easy way to make specific buttons flash. I assumed that was possible because my scene hierarchy included those sub-meshes, which are easy to color, but impossible to reference via OVRAvatar.

Here's my setup: my original LocalAvatar prefab came from SampleScenes/Hands/CustomControllers which includes modifiable prefabs for the left and right controller. Then I added OVRAvatar to the scene, and never guessed I actually had two pair of controllers running in the scene (the custom controller and the OVRAvatar dynamically generated one).

Fortunately, this also yields some simple workarounds for my original question until Oculus provides a simpler way to highlight the buttons. Option 1: just use custom controllers the entire time and do exactly what you want. Option 2: When you want to highlight buttons (like during a tutorial), just hide the default Avatar controller and show your custom controller.