I’m getting weird results during visualisation of physx data:
Some cubes ale ‘levitating’, all shapes aren’t close to each other - in pvd it looks alright:
Here’s code which render each _shape:
virtual void render() {
physx::PxU32 nShapes = rigid_->getNbShapes();
physx::PxShape** shapes = new physx::PxShape*[nShapes];
rigid_->getShapes(shapes, nShapes);
while (nShapes--) {
DrawShape(shapes[nShapes]);
}
delete [] shapes;
}
virtual void DrawShape(physx::PxShape* shape) {
physx::PxTransform pT = physx::PxShapeExt::getGlobalPose(*shape, *rigid_);
physx::PxMat44 m = physx::PxMat44(pT);
float mat[16];
getColumnMajor(m, mat);
glPushMatrix();
glMultMatrixf(mat);
// shape here eg:
glutSolidSphere(1,20,20);
glPopMatrix();
}
All ogl matrix looks ok, I’ can’t figure you why plane is rotated, objects are not close as it is in pvd(levitation) - any ideas?