NoodlesOnMyBack
20-03-2008 17:16:34
Im closer to finally create a ragdoll, i came across with a different problem this time, i want to create a joint between the torso and the arm, but changing the localAnchor value of both actors (i rule at paintbrush):
By default NxOgre set them both to 0,0,0 wich its ok, but now i want to change them to a different location, but if i do this:
Nothing happens, both bodies are atached by 0,0,0, and in the AGEIA samples i saw that they atach both actors in the spherical object descriptor , so i added this line:
But NxOgre crashed at nxjointdesc.h
So, is there a way to do this just like NxOgre is? or i have to recompile the lib adding some extra params? it would be nice if dont need to do this.
By default NxOgre set them both to 0,0,0 wich its ok, but now i want to change them to a different location, but if i do this:
sphericalDesc.localAnchor[0].set(NxOgre::toNxVec3(Actor1Pos));
sphericalDesc.localAnchor[1].set(NxOgre::toNxVec3(Actor2Pos));
sphericalDesc.setGlobalAnchor(NxOgre::toNxVec3(pos));
sphericalDesc.setGlobalAxis(NxOgre::toNxVec3(axis));
JointParams jp;
jp.setToDefault();
jp.fromNxJointDesc(sphericalDesc);
mScene->createSphericalJoint(a1,a2,pos,jp);
Nothing happens, both bodies are atached by 0,0,0, and in the AGEIA samples i saw that they atach both actors in the spherical object descriptor , so i added this line:
sphericalDesc.actor[0] = a1->mActor;
sphericalDesc.actor[1] = a2->mActor;
But NxOgre crashed at nxjointdesc.h
NX_INLINE void NxJointDesc::setGlobalAnchor(const NxVec3 & wsAnchor)
{
NxGetUtilLib()->NxJointDesc_SetGlobalAnchor(*this, wsAnchor);
}
So, is there a way to do this just like NxOgre is? or i have to recompile the lib adding some extra params? it would be nice if dont need to do this.