Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
lucas_o_hartley's avatar
lucas_o_hartley
Honored Guest
7 years ago

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 ?  

5 Replies

Replies have been turned off for this discussion
  •       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.
  •  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 


  • 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.

  • 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.