The Physic Material adjusts friction and bouncing effects of colliding GameObjects.
To create a Physic Material, select Assets > Create > Physic Material from the menu bar. Then drag the Physic Material from the Project View onto a Collider in the scene.
属性: | 功能: |
---|---|
Dynamic Friction | 已在移动时使用的摩擦力。通常为 0 到 1 之间的值。值为零就像冰一样,值为 1 将使对象迅速静止(除非用很大的力或重力推动对象)。 |
Static Friction | 当对象静止在表面上时使用的摩擦力。通常为 0 到 1 之间的值。值为零就像冰一样,值为 1 将导致很难让对象移动。 |
Bounciness | 表面的弹性如何?值为 0 将不会反弹。值为 1 将在反弹时不产生任何能量损失,预计会有一些近似值,但可能只会给模拟增加少量能量。 |
Friction Combine | 两个碰撞对象的摩擦力的组合方式。 |
- Average | 对两个摩擦值求平均值。 |
- Minimum | 使用两个值中的最小值。 |
- Maximum | 使用两个值中的最大值。 |
- Multiply | 两个摩擦值相乘。 |
Bounce Combine | 两个碰撞对象的弹性的组合方式。其模式与 Friction Combine 模式相同 |
摩擦力是防止表面相互滑落的量。尝试堆叠对象时,此值很重要。摩擦力有两种形式:动态和静态。对象静止时使用__静态摩擦力。静态摩擦力会阻止对象开始移动。如果向对象施加足够大的力,对象将开始移动。随后,__动态摩擦力__将发挥作用。动态摩擦力__现在将尝试在与另一个对象接触时减慢对象的速度。
当两个对象接触时,根据所选择的模式对它们两者施加相同的弹性和摩擦力效果。当两个接触的碰撞体具有不同的组合模式设置时,存在一种特殊情况。在这种特殊情况下,使用具有最高优先级的函数。优先级顺序如下:__Average__ < Minimum < Multiply < Maximum。例如,如果一种材质设置了 Average__,但另一种材质设置了 Maximum__,那么要使用的组合函数是 __Maximum__,因为它具有更高的优先级。
请注意,Nvidia PhysX 引擎使用的摩擦力模型针对模拟的性能和稳定性进行了调整,并不一定代表真实物理的高度近似值。具体而言,大于单个点的接触面(例如两个相互叠放在一起的盒子)将计算为具有两个接触点,其摩擦力将是现实世界物理学中的两倍。在这种情况下,可能希望将摩擦系数乘以 0.5 以获得更真实的结果。
同样的逻辑适用于弹性模型。由于各种模拟细节(如位置校正),Nvidia PhysX 无法保证完美的能量守恒效果。因此,比如说,如果受重力影响的对象的弹性值为 1,并与弹性为 1 的地面碰撞,则对象的弹跳高度应该会高于初始位置。
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.