A simple box falling program works fine with my program, I could see the animation from pvd. However, when I just want to link two objects with a joint(whatever kinds of joints it is). The program builds well, but would crash if the PVD is connected. If I didn’t open the PVD, the program will go through.
The error message from the debugger is …\PhysXVisualDebuggerSDK\PvdDataStream.cpp(504): Assertion failed: success.
use breakpoint to debug, the crash seems accured here:
PvdError createInstance( const TDataType* inst )
return createInstance( getPvdNamespacedNameForType(), inst );
My programm is also quite simple as follows:
// Create Fix Joint
PxVec3 pos = PxVec3(0, 5, 3); // position of static actor
PxVec3 posDyn = PxVec3(0, 3, 0); // position of dynamic actor
PxVec3 offset = PxVec3(0,1,0); // Offset of connected actor from joint
PxRigidActor* staticActor = PxCreateStatic(*gPhysicsSDK, PxTransform(pos), PxSphereGeometry(0.5f), mMaterial);
PxRigidDynamic connectedActor = PxCreateDynamic(*gPhysicsSDK, PxTransform(posDyn), PxBoxGeometry(0.5,0.5,2), *mMaterial, 1.0f);
//adding actors to scene
PxDistanceJoint distanceJoint = PxDistanceJointCreate(*gPhysicsSDK, staticActor, PxTransform(offset), connectedActor, PxTransform(-offset));