aws / lumberyard

Amazon Lumberyard is a free AAA game engine deeply integrated with AWS and Twitch – with full source.
Other
2.02k stars 539 forks source link

Allow arbitrarily many cylinder subdivisions #514

Open yuriy0 opened 3 years ago

yuriy0 commented 3 years ago

PhysX does not support cylinders as primitives so they must be approximated by meshes. In order to be useable as a dynamic object, the mesh must be convex, but convex meshes are limited by number of polys and vertices.

Currently the cylinder approximation will always generate one convex mesh to represent the cylinder. For many cylinders the vertex limit still gives fairly precise approximations. This might not be the case for large cylinders where the accuracy of dynamics is important.

The changes the function which approximates cylinder geomtry in Physx: if the cylinder mesh exceeds the max number of PhysX convex mesh polys, instead split it into several shapes.

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

AMZN-puvvadar commented 3 years ago

Hey @yuriy0 ,

We took a look at this change are unable to accept it for the following reasons.

If you could clarify or address the above, we'd be happy to take another look. Thanks again for taking the time to submit!