Hi everyone,
I have two actors in my simulation. The first one is a kinematic actor (Capsule) representing the haptic device. I set its position in real time with the transforms of the haptic device through setKinematicTarget(). The second actor is a RigidStatic Actor, which is a triangle mesh.
I got to know that there is no interaction or collision between kinematic actor and static actor. However, it is possible to request contact information for them.
I’m able to get contact report from the callback function and everything works fine. But I have several questions:
-
About the contact positions, are those positions on the shapes of the actor or the bounding volumes of the shapes? For example, my kinematic actor is a capsule, and my static actor is a triangle mesh, are the contact positions exactly on the capsule and the triangles where they collide, or on the bounding volumes of the capsule and the triangle mesh?
-
I tried to change the static actor to a sphere and a box to understand the contact positions. For capsule to sphere collision , I always get one contact position no matter what, why? For capsule to box collision, there are at most two contact positions. For capsule to triangle mesh collision, it seems it returns all the contact positions on all the triangles that the capsule collides with.
-
What is the internal face index that the contact report returns?
-
Is it possible to get impulses at the same time? In my case, I can only get contact positions, I tried to output the impulses vectors, but they are all zeros. So, is it possible to get impulses between kinematic actors and static actors?
-
I was trying to get the exact first one contact position when the kinematic actor collides with the static actor by raising the flag “PxPairFlag::eNOTIFY_TOUCH_FOUND”. However, what I got was not one contact position, but several. Is it possible to get the contact position at first collision?
-
The contact report can also return normals at contact positions. It’s says that the direction of the normal is pointing from the second actor to the first actor. How to decide which one is the first/ second?
-
The reason that I ask about the first contact position and the normal is because I want to implement my own collision detection and respond between the kinematic actor and the static vector. In order to do that, I need to know the contact position and contact normal at first collision to implement the sliding of the kinematic actor over the static actor rather than penetrating it.
-
Or is there any other better way to implement the collision detection and response between kinematic actor and static actor since there is no interaction or collision between kinematic actor and static actor in PhysX ?
-
I also got to know that the Character Controller is Kinematic. And I played with some samples in PhysX, the character (represented with a standing capsule) is able to slide against other objects or heightfield without penetrating any objects . It says that the behavior of the character is implemented with the ‘collide and slide’ algorithm. So, in my case, is it possible to represent the haptic device with a Kinematic Character instead of a Kinematic actor so that I don’t have to implement the collide and slide algorithm between a kinematic actor and static actor by myself?
Thanks in advance for your help!