角色关节 (Character Joint) 主要用于布娃娃效果。此类关节是延长的球窝关节,可在每个轴上限制该关节。
如果仅希望设置布娃娃,请阅读布娃娃向导。
属性: | 功能: |
---|---|
Connected Body | 对关节所依赖的__刚体__的引用(可选)。如果未设置,则关节连接到世界。 |
Anchor | 关节在__游戏对象__的局部空间中旋转时围绕的点。 |
轴 | 扭转轴。用橙色的辅助图标椎体可视化。 |
Auto Configure Connected Anchor | 如果启用此属性,则会自动计算连接锚点 (Connected Anchor) 位置以便与锚点属性的全局位置匹配。这是默认行为。如果禁用此属性,则可以手动配置连接锚点的位置。 |
Connected Anchor | 手动配置连接锚点位置。 |
Swing Axis | 摆动轴。用绿色的辅助图标椎体可视化。 |
Low Twist Limit | 关节的下限。请参阅下文。 |
High Twist Limit | 关节的上限。请参阅下文。 |
Swing 1 Limit | 限制围绕定义的__摆动轴 (Swing Axis)__ 的一个元素的旋转(用辅助图标上的绿色轴可视化)。请参阅下文。 |
Swing 2 Limit | 限制围绕定义的__摆动轴__的一个元素的移动。请参阅下文。 |
Break Force | 为破坏此关节而需要施加的力。 |
Break Torque | 为破坏此关节而需要施加的扭矩。 |
Enable Collision | 选中此复选框后,允许关节连接的连接体之间发生碰撞。 |
Enable Preprocessing | 禁用预处理有助于稳定无法满足的配置。 |
角色关节提供了很多约束运动的可能性,就像使用万向节一样。
扭转轴(用辅助图标上的橙色椎体可视化)可在很大程度上控制上限和下限,允许按照度数指定上限和下限(限制角度是相对于开始位置进行测量的)。Low Twist Limit > Limit 中的值 –30 和 High Twist Limit > Limit 中的值 60 可将围绕扭转轴(橙色辅助图标)的旋转范围限制在 –30 度到 60 度之间。
Swing 1 Limit 可限制摆动轴的旋转范围(用辅助图标上的绿色轴可视化)。限制角度是对称的。因此,值 30 会将旋转限制在 –30 到 30 之间。
Swing 2 Limit 轴未显示在辅助图标上,但该轴垂直于其他两个轴(即辅助图标上用橙色可视化的扭转轴和辅助图标上用绿色可视化的 Swing 1 Limit 轴)。 角度是对称的,因此值 40 可将围绕该轴的旋转范围限制在 –40 度到 40 度之间。
对于每个限制,可以设置以下值:
属性: | 功能: |
---|---|
Bounciness | 值为 0 将不会反弹。值为 1 将在反弹时不产生任何能量损失。 |
Spring | 用于将两个对象保持在一起的弹簧力。 |
Damper | 用于抑制弹簧力的阻尼力。 |
Contact Distance | 在距离极限位置的接触距离内,接触将持续存在以免发生抖动。 |
可使用 Break Force 和 Break Torque 属性来设置关节强度的限制。如果这些值小于无穷大,并对该对象施加大于这些限制的力/扭矩,则其固定关节将被破坏并将摆脱其约束的束缚。
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.