PxController getActor has a messed up PxTransform

I was attempting to use the PxGeometryQuery::overlap method to determine if my PxController character was intersecting with another PxRigidActor.

When I used the PxController->getActor() and pulled the global transform via PxShapeExt::getGlobalPose() I ended up getting a PxTransform that had some goofy scaling/rotations on the matrix.

-0.000000,-1.000000,0.000000,312.361237
1.000000,	-0.000000,0.000000,40.599998
0.000000,	0.000000,	1.000000,	-256.734924
0.000000,	0.000000,	0.000000,	1.000000

Am I supposed to be able to get the PxTransform from my Capsule PxController or should I be setting up a PxTransform of my own for PxControllers? The Translation components are all there and correct…

Can you explain what is unexpected about the global pose of the capsule? The rotational component looks like a rotation of Pi/2 around the z-axis. That sounds correct to me. A capsule is defined to have its extent along the x axis in model space so its local pose would need to be rotated around z to make it stand vertically in world space, assuming that y is the global up vector and the actor had identity transform.

The rotation might be right but I think my issue comes from the scale of -0 in the x and y axis making the geometry only have a size on the z axis. So when I pass the PxTransform of my Capsule PxController to the PxGeometryQuery::overlap method it wouldn’t have any actual size to overlap against. At least that’s what seems to be happening. I can see the overlap happen in the Visual Debugger but the method still doesn’t show any overlaps.

Here’s the code that I’m using: http://pastebin.com/ZyqPmDt1

The code above works with 2 boxes. Example: I added two boxes, one above the other, the top one with gravity, the other without, and as soon as it gets near the box it returns true. It’s just the PxController actor that isn’t returning when overlapping.
http://uploader.opifexentertainment.com/data/Screen%20Shot%202015-07-01%20at%202.24.31%20PM.png

I suspect this is due to the contact offset of the PxShape instances in your scene. The contact offsets act to expand the shapes, meaning that contacts are reported before the shapes themselves actually overlap. The overlap function you’re using doesn’t account for the contact offset so it is doing a different test from the one peformed by the sdk. To test this thoery you could try to set the contact offset to zero for all shapes and then see if your overlap test coincides with what you see in pvd. The alternative would be to modify the PxGeometry that you pass to the overlap function to account for the contact offset.

I don’t know the api for the character controller very well but I’d be surprised if it didn’t have a mechanism to return all contacts per frame.