Browse Source

Updated comments.

jorrit 2 years ago
parent
commit
ce45bd3136
1 changed files with 1 additions and 2 deletions
  1. 1 2
      Jolt/Physics/Collision/EstimateCollisionResponse.h

+ 1 - 2
Jolt/Physics/Collision/EstimateCollisionResponse.h

@@ -32,7 +32,6 @@ struct CollisionEstimationResult
 
 /// This function estimates the contact impulses and body velocity changes as a result of a collision.
 /// It can be used in the ContactListener::OnContactAdded to determine the strength of the collision to e.g. play a sound or trigger a particle system.
-/// It only uses the contact points and restitution to estimate the velocity changes and will ignore friction.
 /// This function is accurate when two bodies collide but will not be accurate when more than 2 bodies collide at the same time as it does not know about these other collisions.
 /// 
 /// @param inBody1 Colliding body 1
@@ -42,7 +41,7 @@ struct CollisionEstimationResult
 /// @param inCombinedFriction The combined friction of body 1 and body 2 (see ContactSettings::mCombinedFriction)
 /// @param inCombinedRestitution The combined restitution of body 1 and body 2 (see ContactSettings::mCombinedRestitution)
 /// @param inMinVelocityForRestitution Minimal velocity required for restitution to be applied (see PhysicsSettings::mMinVelocityForRestitution)
-/// @param inNumIterations Number of iterations to use for the impulse estimation (see PhysicsSettings::mNumVelocitySteps)
+/// @param inNumIterations Number of iterations to use for the impulse estimation (see PhysicsSettings::mNumVelocitySteps, note you can probably use a lower number for a decent estimate). If you set the number of iterations to 1 then no friction will be calculated.
 void EstimateCollisionResponse(const Body &inBody1, const Body &inBody2, const ContactManifold &inManifold, CollisionEstimationResult &outResult, float inCombinedFriction, float inCombinedRestitution, float inMinVelocityForRestitution = 1.0f, uint inNumIterations = 10);
 
 JPH_NAMESPACE_END