Uninomicon

Documenting the dark corners of the Unity Engine.

User Tools

Site Tools


physicmaterial

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
physicmaterial [2021/12/09 12:55]
gondophares created
physicmaterial [2021/12/11 21:12] (current)
uninomiconadmin
Line 1: Line 1:
-====== Friction values ======+====== PhysicMaterial ======
  
-Physic Material (note the incorrect spelling!) is a small data object that can be attached to Colliders to provide parameters for their collision behavior. 
  
-If NVidia PhysX is being used (currently default physics system), static and dynamic friction values operate according to the Coulomb model of friction. For a Rigidbody sliding (horizontallyacross another collider, the "friction force" points in the opposite direction of the Rigidbody's momentum and its magnitude is:+===== Friction values ===== 
 +Physic Material ((Note the incorrect spelling!)) is a small data object that can be attached to Colliders to provide parameters for their collision behavior. 
 + 
 +If NVidia PhysX is being used ((Currently this is the default physics system)), static and dynamic friction values operate according to the Coulomb model of friction. For a Rigidbody sliding horizontally across another collider, the "friction force" points in the opposite direction of the Rigidbody's momentum and its magnitude is:
  
 ''N * µ''  ''N * µ'' 
Line 9: Line 11:
 where:  where: 
   * N is the normal force, i.e. mass * gravity   * N is the normal force, i.e. mass * gravity
-  * µ is (dynamic or static) friction coefficient (see section "Friction Combine")+  * µ is (dynamic or static) friction coefficient ((See "Friction Combine"))
   
 Loosely put: "friction" counteracts a Rigidbody's momentum with a minimum magnitude of 0 and a maximum of m*g. The friction values are clamped 0-1 because values > 1 would "create" energy. Loosely put: "friction" counteracts a Rigidbody's momentum with a minimum magnitude of 0 and a maximum of m*g. The friction values are clamped 0-1 because values > 1 would "create" energy.
  
  
-====== Friction combine ======+===== Friction combine =====
  
 The value µ from the friction calculation above is calculated from both colliding materials. The "friction combine" field determines what calculation is used. If two colliding Physic Materials have different "friction combine" values, the Unity documentation //correctly// states that the order of priority goes Maximum > Multiply > Minimum > Average. //However//, this does not respect the underlying int values of the PhysicMaterialCombine: The value µ from the friction calculation above is calculated from both colliding materials. The "friction combine" field determines what calculation is used. If two colliding Physic Materials have different "friction combine" values, the Unity documentation //correctly// states that the order of priority goes Maximum > Multiply > Minimum > Average. //However//, this does not respect the underlying int values of the PhysicMaterialCombine:
Line 23: Line 25:
   * 3 Maximum   * 3 Maximum
  
-This will trip you up if you (reasonably) expect these to match.+This will trip you up if you expect these to match.
physicmaterial.1639054504.txt.gz · Last modified: 2021/12/09 12:55 by gondophares