cancel
Showing results for 
Search instead for 
Did you mean: 

The phalanges are driving me mad!

lucas_o_hartley
Honored Guest
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 ?  
4 REPLIES 4

lucas_o_hartley
Honored Guest
      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_hartley
Honored Guest
 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 


tikitofu
Explorer
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.

tikitofu
Explorer
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.