How to get the global Position and orientation of a PxActor

Hello everyone. Someone could tell me what functions I use to give me back the global position and global orientation of a PxActor? I’ve looked and can not find in the documentation.

Greetings.

Maybe you looked in the wrong place. PxActors don’t necessarily have a pose. I am assuming you are working with rigid actors (rigid dynamics, rigid statics) - then you have to look in their common base-class “PxRigidActor”. That’s where “getGlobalPose()” is first declared. The pose consists of a translation/position-vector “p” and an orientation-quaternion “q”. Both are global inside the scene they are in.

But getGlobalPose PxTransform returns. I understand then that PxTransform containing both the vector position and also the orientation quaternion, right? Does that mean that for each rigid dynamics there must be a object PxTransform stored to retain the position and orientation between frames when you have many rigid dynamics in my application?

Yes, each rigid actor has a PxTransform defining its global translation and rotation, which you can set or retrieve with the set/getGlobalPose function. You can only set the entire pose, not just the translation OR rotation, unless I am terribly mistaken. So, if you just want to change the position, for example, you get the pose-transform from the actor, change p, and set the pose to the new transform.

Thanks