🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Triangle mesh in PhysX

Started by
1 comment, last by Aardvajk 4 years, 2 months ago

Hello.

I work with triangular grids in PhysX, I successfully create a rigid body and everything works.

The problem is that the body works as a kinematic, that is, it does not obey the forces of gravity and does not fly away in collisions, the documentation says that a body created using a triangular grid can only be kinematic, but I found a couple of examples of where bodies of complex shape(probably created using triangular grids) work like normal dynamic bodies.

Here's(first, second) a couple of videos where you can see it.

I have an idea to create (using convex mesh) a bunch of triangles that are contained in the data about triangle mesh and connect them together, but I'm not sure that at least a hundred of these triangles connected to each other will work productively.

What should I do to use triangular meshes for bodies that should work as dynamic bodies?

Thanks.

Advertisement

Generally one would compose the shape as a set of connected convex shapes, as you say. But you shouldn't need “hundreds of triangles”. You would just approximate the general shape of your mesh with simpler primitives.

Generally the mesh that one uses for rendering is entirely unsuitable to be used as data for the physics engine.

What exactly is the mesh in question here?

This topic is closed to new replies.

Advertisement