The phalanges are driving me mad! — Oculus
Welcome to the Oculus Developer Forums!

Your participation on the forum is subject to the Oculus Code of Conduct.

In general, please be respectful and kind. If you violate the Oculus Code of Conduct, your access to the developer forums may be revoked at the discretion of Oculus staff.

The phalanges are driving me mad!

Hi all,

I'm  trying to  add  a simple sphere collider at the  hand joint : index tip.  so i thought this would be easy in the documentation  i found the accessor function gethandtransform(), so i grabbed the gameobject of this transform tried to add   the sphere collider..... and no luck. 

next step i tried to create a  game object at the point, set its parent to the gethandtransform, set its position ect ect and still no luck, then i spotted that  in the hierarchy  that  the object  right hand is disabled. how can i achieve what i want to do ?  

Comments

  • lucas.o.hartleylucas.o.hartley Posts: 3
    NerveGear
          public Transform indextip
        {
            get { return myavatar.GetHandTransform(OvrAvatar.HandType.Right, OvrAvatar.HandJoint.IndexTip); }
          
        }

    so this is how i grabbed the index tip  bone, then i wanted to add a sphere collider  to this gameobject. in the standard unity  way addcomponet<> ect ect.
  • lucas.o.hartleylucas.o.hartley Posts: 3
    NerveGear
     Right,  so this was driving my crazy just to add a sphere colliider to a transform, but i found     


    internal void Initialize(ovrAvatarRenderPart_SkinnedMeshRender skinnedMeshRender, Shader surface, Shader surfaceSelfOccluding, int thirdPersonLayer, int firstPersonLayer, int sortOrder)
        {

           

            this.surfaceSelfOccluding = surfaceSelfOccluding != null ? surfaceSelfOccluding :  Shader.Find("OvrAvatar/AvatarSurfaceShaderSelfOccluding");
            this.surface = surface != null ? surface : Shader.Find("OvrAvatar/AvatarSurfaceShader");
            this.mesh = CreateSkinnedMesh(skinnedMeshRender.meshAssetID, skinnedMeshRender.visibilityMask, thirdPersonLayer, firstPersonLayer, sortOrder);
            bones = mesh.bones;
            UpdateMeshMaterial(skinnedMeshRender.visibilityMask, mesh);
            
            
            

        }


    so I'm  just going  to loop through the bones here, create the colliders  in the same script, I will post it on here once im finished hopefully that will help other having this issue.

    all this to interact with a 3d button lol 


  • tikitofutikitofu Posts: 11
    NerveGear
    Hi, I've created colliders for my fingertip but it does get detected when passing through a trigger. Am I missing something?  I've tested it on colliders that are not on the hand, and it works fine.

    My collider is on "hands:b_l_index3" as trigger capsule collider.

    Thanks.

  • tikitofutikitofu Posts: 11
    NerveGear
    Hi, I've created colliders for my fingertip but it does get detected when passing through a trigger. Am I missing something?  I've tested it on colliders that are not on the hand, and it works fine.

    My collider is on "hands:b_l_index3" as trigger capsule collider.

    Thanks.

Sign In or Register to comment.