Hi,
I'm trying to attach a mesh to a socket, what I want is that this mesh can follow the movement of
the socket positioned on another mesh. I followed this link
http://www.crystalspace3d.org/trac/CS/attachment/ticket/340/sockets.txibut there a thing that I don't understand on the source code (that I report hereunder):
bool AttachMesh (iMeshWrapper* actorMesh, const char* socketName,
106 const char* objectFactoryName)
107 @{
108 iMeshFactoryWrapper* objectFactory = engine->GetMeshFactories ()
109 ->FindByName (objectFactoryName);
110 if (!objectFactory) return false;
111 csRef<iMeshWrapper> object = engine->CreateMeshWrapper (objectFactory,
112 objectFactoryName);
113 csRef<iGeneralMeshState> genstate = scfQueryInterface<iGeneralMeshState> (
114 GetMesh ()->GetMeshObject ());
115 if (genstate)
116 {
117 csRef<iGenMeshAnimationControl> skelstate = genstate
118 ->GetAnimationControl ();
119 if (skelstate)
120 {
121 csRef<iGenMeshSkeletonControlState> ctlstate =
122 scfQueryInterface<iGenMeshSkeletonControlState> (skelstate);
123 if (ctlstate)
124 {
125 csRef<iSkeleton> skel = ctlstate->GetSkeleton ();
126 if (skel)
127 {
128 iSkeletonSocket* skelsocket = skel->FindSocket (socketName);
129 if (!skelsocket) return false;
130 object->QuerySceneNode ()->SetParent (actorMesh->QuerySceneNode ());
131 skelsocket->SetSceneNode (object->QuerySceneNode ());
132 return true;
133 }
134 }
135 }
136 }
137 @}This method get three parameters, the name of the mesh with socket, the name
of the socket, and the
objectFactoryName that really I have no idea what
is......can be the name of the mesh that I want to attach? I tryed to put this name
but without success...
Any Suggest?

Thanks!