|
@@ -97,9 +97,9 @@ public:
|
|
|
bool GetAllowSleeping() const { return mMotionProperties->mAllowSleeping; }
|
|
|
void SetAllowSleeping(bool inAllow);
|
|
|
|
|
|
- /// Friction (dimensionless number, usually between 0 and 1, 0 = no friction, 1 = friction force equals force that presses the two bodies together)
|
|
|
+ /// Friction (dimensionless number, usually between 0 and 1, 0 = no friction, 1 = friction force equals force that presses the two bodies together). Note that bodies can have negative friction but the combined friction (see PhysicsSystem::SetCombineFriction) should never go below zero.
|
|
|
inline float GetFriction() const { return mFriction; }
|
|
|
- void SetFriction(float inFriction) { JPH_ASSERT(inFriction >= 0.0f); mFriction = inFriction; }
|
|
|
+ void SetFriction(float inFriction) { mFriction = inFriction; }
|
|
|
|
|
|
/// Restitution (dimensionless number, usually between 0 and 1, 0 = completely inelastic collision response, 1 = completely elastic collision response). Note that bodies can have negative restitution but the combined restitution (see PhysicsSystem::SetCombineRestitution) should never go below zero.
|
|
|
inline float GetRestitution() const { return mRestitution; }
|
|
@@ -321,7 +321,7 @@ private:
|
|
|
CollisionGroup mCollisionGroup; ///< The collision group this body belongs to (determines if two objects can collide)
|
|
|
|
|
|
// 4 byte aligned
|
|
|
- float mFriction; ///< Friction of the body (dimensionless number, usually between 0 and 1, 0 = no friction, 1 = friction force equals force that presses the two bodies together)
|
|
|
+ float mFriction; ///< Friction of the body (dimensionless number, usually between 0 and 1, 0 = no friction, 1 = friction force equals force that presses the two bodies together). Note that bodies can have negative friction but the combined friction (see PhysicsSystem::SetCombineFriction) should never go below zero.
|
|
|
float mRestitution; ///< Restitution of body (dimensionless number, usually between 0 and 1, 0 = completely inelastic collision response, 1 = completely elastic collision response). Note that bodies can have negative restitution but the combined restitution (see PhysicsSystem::SetCombineRestitution) should never go below zero.
|
|
|
BodyID mID; ///< ID of the body (index in the bodies array)
|
|
|
|