Improved CharacterDemo/KinematicCharacterController, dynamic objects will bounce off.
Don't create a todo list for doxygen by default (the chaotic todo's would confuse most developers) Improve support for small objects, by having dynamic contact breaking thresholds. Still needs small internal timestep and some GJK improvements.
This commit is contained in:
@@ -42,8 +42,14 @@ void btCollisionShape::getBoundingSphere(btVector3& center,btScalar& radius) con
|
||||
center = (aabbMin+aabbMax)*btScalar(0.5);
|
||||
}
|
||||
|
||||
btScalar btCollisionShape::getContactBreakingThreshold() const
|
||||
{
|
||||
///@todo make this 0.1 configurable
|
||||
return getAngularMotionDisc() * btScalar(0.1);
|
||||
}
|
||||
btScalar btCollisionShape::getAngularMotionDisc() const
|
||||
{
|
||||
///@todo cache this value, to improve performance
|
||||
btVector3 center;
|
||||
btScalar disc;
|
||||
getBoundingSphere(center,disc);
|
||||
|
||||
@@ -46,6 +46,8 @@ public:
|
||||
///getAngularMotionDisc returns the maximus radius needed for Conservative Advancement to handle time-of-impact with rotations.
|
||||
virtual btScalar getAngularMotionDisc() const;
|
||||
|
||||
virtual btScalar getContactBreakingThreshold() const;
|
||||
|
||||
|
||||
///calculateTemporalAabb calculates the enclosing aabb for the moving object over interval [0..timeStep)
|
||||
///result is conservative
|
||||
|
||||
Reference in New Issue
Block a user