- Home /
Physic Material Friction Combine Mode lack of documentation?
Tested stuff:
There were 2 objects with different Physic Materials: A, B
A moved on B acting as ground
In each case only!! the Friction Combine Mode was changed
FCM - Friction Combine Mode
DST - distance travelled over time T
The combine modes in order(the numbers between the parentheseses below correspond to these):
- Average
- Multiply
- Minimum
- Maximum
A.FCM = Average(1); B.FCM = Average(1) | DST = DST2
// DST changed => Multiply(2) overwrote Average(1) in case 2. and 3.
A.FCM = Minimum(3); B.FCM = Multiply(2) | DST = DST3
// DST changed => Minimum(3) overwrote Multiply(2)
I sincerely think I'm right that the cause is the combine modes' order where later ones have higher priority and thus overwrite the ones with lower priority and the friction value used as the friction value for the friction between the 2 colliding objects is determined by this single combine mode.
My problem is that I haven't heard anyone mention this and the bigger problem is that even now after a quick(too quick) googling I didn't find any mention of this.
To make it so that noone may say that this should've gone to the forum instead let me make a few simple questions out of all this.
Am I right? Why haven't I found any mention of this phenomenon? Should one know this off the cuff?
This isn't anything that would be sent to the forum because it's asking about a specific Unity implementation rather than a subjective opinions about something. Wouldn't it just be simpler to ask "How does the Physic $$anonymous$$aterial Friction Combine $$anonymous$$ode work?" and then simply elaborated on your experiment and question?
well yeah you're right - thanks, really; hopefully next time I won't forget this part
Good question matyicsapo. I was also interested in finding the priority of friction combine. Found the same relationship presented here and now i see this post.
Answer by skovacs1 · Oct 08, 2010 at 06:28 PM
This is undocumented functionality.
From my tests, the friction combine mode used uses the largest PhysicMaterialCombine in the PhysicMaterialCombine enumeration of the two materials.
The enumeration is something like:
enum PhysicMaterialCombine {
Average = 0,
Multiply = 1,
Minumum = 2,
Maximum = 3
};
and the combination function for let's say dynamic friction would be something like:
var dynamicFriction : float = object1.collider.material.dynamicFriction;
switch((PhysicMaterialCombine)
Mathf.Max(object1.collider.material.frictionCombine,
object2.collider.material.frictionCombine)) {
case PhysicMaterialCombine.Average:
dynamicFriction += object2.collider.material.dynamicFriction;
dynamicFriction /= 2.0;
break;
case PhysicMaterialCombine.Multiply:
dynamicFriction *= object2.collider.material.dynamicFriction;
break;
case PhysicMaterialCombine.Minumum:
dynamicFriction = Mathf.Min(dynamicFriction,
object2.collider.material.dynamicFriction);
break;
case PhysicMaterialCombine.Maximum:
dynamicFriction = Mathf.Max(dynamicFriction,
object2.collider.material.dynamicFriction);
break;
}
I believe it is also the same for the bounceCombine.
Answer by BenTristem · Aug 04, 2015 at 03:14 PM
Hey, we've just done some testing for our Game Physics Course, and we think the order of precedence is Max, Mult, Min, Average in decreasing order. Hopefully this table below will help..
Your answer
Follow this Question
Related Questions
Physic Material Component reference 1 Answer
How does priority/ simultaneity work in Unity? 2 Answers
What is the appropriate value of Friction Direction 2? 1 Answer
ForceMode.Acceleration estimated dst != covered dst with a single Addforce in effect 1 Answer
Question on Physic Materials, Rigibodies, and Acelleration 0 Answers