继续上一篇对物理系统的概述。本篇主要学习和物理系统相关联的一些组件。这里略去了一些无聊的碰撞体,直接从一些平时注意不到但是很有意思的组件开始。
首先介绍一个基础概念:力矩在物理学里是指作用力使物体绕着转动轴或支点转动的趋向。
(1)Character Joint
Character Joints are mainly used for Ragdoll effects. They are an extended ball-socket joint which allows you to limit the joint on each axis.
角色关节在布娃娃系统当中应用。主要就是根据骨骼将整个人物的碰撞体以及骨骼之间限制角度等等调整好,从而在没有动作的情况下,模拟出真实的人物死亡或者炸飞的效果。
该控件的几个重要属性:
The point in the GameObject’s local space where the joint rotates around.
Anchor:锚点,整个绕着该锚点进行旋转。注意这是局部坐标系。
Auto Configure Connected Anchor:自动设置链接锚点的Flag。如果设置为true,那么链接锚点(Connected Anchor)会自动进行计算。
Connected Anchor:Manual configuration of the connected anchor position.
这个是手动调整锚点的位置。这个相对于锚点,是全局坐标。调整位置可以让骨骼更自然。比如slenderman的游戏角色。
The Swing 1 Limit: limits the rotation around the swing axis (visualized with the green axis on the gizmo). The limit angle is symmetric. Thus a value of 30 will limit the rotation between –30 and 30.
限制围绕摆动轴(swing axis)的旋转。限制角度是对称的。
The Swing 2 Limit: axis isn’t visualized on the gizmo but the axis is orthogonal to the two other axes (that is the twist axis visualised in orange on the gizmo and the Swing 1 Limit visualised in green on the gizmo). The angle is symmetric, thus a value of 40 will limit the rotation around that axis between –40 and 40 degrees.
在Gizmo上轴不可视化,但轴与其他两个轴正交。该角度是对称的,因此值40将限制该轴在-40度和40度之间的旋转。
Low Twist Limit :限制关节的下限。
High Twist Limit:限制关节的上限。
Break Force :The force that needs to be applied for this joint to break.
关节脱落所需要的力,如果要做断肢的效果,必不可少。
Break Torque:The torque that needs to be applied for this joint to break.
关节脱落所需要的力矩。
以上两个属性一旦满足