Original Post
Hello everyone Does anyone know how can a Doom-like camera be implemented with Nvidia PhysX SDK? I have some code for a FPS, already working well 99% of times, using Coldet, and handling the collision response with my own code, but this 1% of times is really annoying: passing through walls, motion jittering etc... So I decided to do this with a physics library. I found PhysX and browsed through the documentation, but still I don't have a clue on how can I make a Doom camera with that. My setup will be something like the following: - Just one Scene, with some static Polygon Soup Objects wich will be the static collision triangles of the scene - Some kinematic objects (no more than 10) that will be of type "polygon soup" again. Those will represent the animated triangles of the scene. - Some convex meshes, which will be the dynamic items that you can drag around - one sphere for the camera. The problem is with the camera. I can't figure out how will it interact with the world. Right now with coldet, my camera is just a floating sphere, but in the physics world there are no floating items allowed. If I made the sphere larger, to touch the ground it would be too fat to pass through doors. If I used a cylinder it would fall on stairs ... Maybe there is a way I can add a custom constraint? That the sphere must float 1.5 meters above the ground? Maybe I have to set the 'y' position of the sphere manually each frame? But then will I have to handle character gravity myself? Does anyone know of an elegant solution for this type of camera with a physics library? Thanks in advance