You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
o3de/Gems/PhysX/Code/Source/Scene
moraaar 3b9762142a
Triangle Mesh with a Kinematic PhysX Rigid Body warns the user instead of error. (#4657)
Using triangle mesh with a kinematic rigid body is allowed, but the options "Compute COM", "Compute Mass" and "Compute Inertia" are not supported by PhysX and an error in logged that default values for COM, Mass and Inertia will be used. Now this situation is captured and an explanatory warning is used instead.

- Improved RigidBody::UpdateMassProperties function to apply the same logic in the treatment of shapes for all three parameters: COM, Mass and Inertia.
- Improved UpdateMassProperties function by using references for the override parameters instead of pointers.
- Improved function that computes the Center of Mass UpdateCenterOfMass (renamed from UpdateComputedCenterOfMass), to include the same shapes that the compute mass and inertia functions in physx updateMassAndInertia, which is to include all shapes if includeAllShapesInMassCalculation is true, else include only the shapes with eSIMULATION_SHAPE flag.
- Removed unused private function RigidBody::ComputeInertia.
- Added unit test to check when the warnings are fired correctly when COM, Mass or Inertia are asked to be computed on a rigid body with triangle mesh shapes.
- Improved MassComputeFixture tests by not only using Box shape, but also sphere and capture, plus improved the PossibleMassComputeFlags parameters to include all possible variations of the MassComputeFlags flags.

Fixes #3322
Fixes #3979

Signed-off-by: moraaar <moraaar@amazon.com>
4 years ago
..
PhysXScene.cpp Triangle Mesh with a Kinematic PhysX Rigid Body warns the user instead of error. (#4657) 4 years ago
PhysXScene.h Merge branch 'development' into cmake/SPEC-7179 4 years ago
PhysXSceneInterface.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
PhysXSceneInterface.h Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
PhysXSceneSimulationEventCallback.cpp Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
PhysXSceneSimulationEventCallback.h Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago
PhysXSceneSimulationFilterCallback.cpp Fixed bug in hash_table that made rehash() function run forever (#2745) 4 years ago
PhysXSceneSimulationFilterCallback.h Shorten copyright headers by splitting into 2 lines (#2213) 4 years ago