hi, this time i fixed my physics objects support so i could add more complicated objects to the scene not just box, sphere etc, but also concave models.
physx does not support dynamic concave objects but it support multiple collision shape per obj so in order to support concave objects we must do something called: convex decomposition which break down or split the mesh into few convex meshes.
the data is stored in xml file which include all the info to create the convex mesh shapes that describe to render model.
i created new function in the physics manager that creates physics obj directly from this xml file, also i add the ability to specify collision script file (this xml) to every render model exist in the scene.
to work with xml files i use tinyXml which is very small and easy to use.
here is few screenshots that shows perfect collision with concave objects:
No comments:
Post a Comment