纳金网

标题: [Unity 组件参考手册]组件:物理组件之弹簧关节 [打印本页]

作者: .    时间: 2013-1-26 19:59
标题: [Unity 组件参考手册]组件:物理组件之弹簧关节
The Spring Joint groups together two Rigidbodies, constraining them to move like they are connected by a spring.弹簧关节组连接两个刚体,让它们像被弹簧连接着一样运动。
The Spring Joint Inspector
-----------------------------------------------------------------------------------------------
Properties 属性    Connected Body 连接体
    Optional reference to the Rigidbody that the joint is dependent upon.
    弹簧关节连接的另一个刚体。 可选,不填另一端和世界相连。
    Anchor 锚
    Position in the object's local space (at rest) that defines the center of the joint. This is not the point that the object will be drawn toward.
    锚,相对于所属物件(初始时)空间的坐标,用于定义关节中心,也就是物件将被拖去的点。
    X
    Position of the joint's local center along the X axis.
    关节的局部中心X坐标
    Y
    Position of the joint's local center along the Y axis.
    关节的局部中心Y坐标
    Z
    Position of the joint's local center along the Z axis.
    关节的局部中心Z坐标
    Spring 弹簧
    Strength of the spring. 弹簧的强度。值越高,创建的弹簧效果越强。
    Damper 阻尼器
    Amount that the spring is reduced when active.
    弹簧的阻尼,当弹簧激活时减少弹簧强度。
    Min Distance 最小距离
    Distances greater than this will not cause the Spring to activate.
    最小距离,如果两物体的当前距离与初始距离差大于该数,则不激活弹簧。
    Max Distance 最大距离
    Distances less than this will not cause the Spring to activate.
    最大距离,如果两物体的当前距离与初始距离差小于该数,则不激活弹簧。
    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.
    破坏关节的扭力的大小。
----------------------------------------------------------------------------------------------
Details 细节Spring Joints allows a Rigidbodied GameObject to be pulled toward a particular "target" position. This position will either be another Rigidbodied GameObject or the world. As the GameObject travels further away from this "target" position, the Spring Joint applies forces that will pull it back to its original "target" position. This creates an effect very similar to a&nbsp***bber band or a slingshot.弹簧关节允许一个刚体物件被拖向一个指定的"目标"点。这个点即可以是另一个刚体物件,也可以是世界。当物件远离目标点时,弹簧关节对其施加力使其被拉回初始目标点。类似橡皮筋与弹弓的效果。The "target" position of the Spring is determined by the relative position from the Anchor to the Connected Body (or the world) when the Spring Joint is created, or when Play mode is entered. This makes the Spring Joint very effective at setting up Jointed characters or objects in the Editor, but is harder to create push/pull spring behaviors in&nbsp***ntime through scripting. If you want to primarily control a GameObject's position using a Spring Joint, it is best to create an empty GameObject with a Rigidbody, and set that to be the Connected Rigidbody of the Jointed object. Then in scripting you can change the position of the Connected Rigidbody and see your Spring move in the ways you expect.这个"目标"点的位置在创建弹簧关节或进入PLAY模式时,由关节的锚与连接的物件(或世界)的相对位置决定(目标点坐标==锚+物件/世界坐标)。这使得弹簧关节在编辑器中设置给角色或物件十分简单,但在脚本中实时生成一个推/拉弹簧行为相对困难。如果一个物件主要是通过弹簧关节来控制位置,那么最好是创建一个包含刚体的空物件,然后将弹簧关节附加给这个空物件,并连接想要控制的物件。这样,在脚本中,你就可以控制这个空物件移动,使得弹簧可以按你期望的运动。
Connected Rigidbody 连接体You do not need to use a Connected Rigidbody for your joint to work. Generally, you should only use one if your object's position and/or rotation is dependent on it. If there is no Connected Rigidbody, your Spring will connect to the world.弹簧关节工作连接另一个刚体并不是必需的。一般来说,当你的物件需要依赖另一个刚体的位置和旋转时,那么就连接它。如果关节没有连接到刚体,那么它将和世界连接。
Spring & Damper 弹簧和阻尼器Spring is the strength of the force that draws the object back toward its "target" position. If this is 0, then there is no force that will pull on the object, and it will behave as if no Spring Joint is attached at all."Spring"是将物件拉回到目标点的力的强度,如果是0,那么没有任何力施加给物件,就像没有使用弹簧关节一样。Damper is the resistance encountered by the Spring force. The lower this is, the springier the object will be. As the Damper is increased, the amount of bounciness caused by the Joint will be reduced."Damper"是抵抗弹簧弹力的力量。值越低,弹力越强。而随着Damper的增加,弹簧的总弹力减少。
Min & Max Distance 最小和最大距离If the position of your object falls in-between the Min & Max Distances, then the Joint will not be applied to your object. The position must be moved outside of these values for the Joint to activate.当相连物件的当前距离保证在(初始距离-min_dis,初始距离+max_dis)范围内,则认为该状态是稳定的,不激活弹簧。否则激活弹簧。
----------------------------------------------------------------------------------------------
Hints 提示    You do not need to assign a Connected Body to your Joint for it to work.
    你不是必须要指定Connected Body到关节来使它工作。
    Set the ideal positions of your Jointed objects in the Editor prior to entering Play mode.
    在进入play模式前先设置好的弹簧对象的位置。
    Spring Joints require your object to have a Rigidbody attached.
    弹簧关节依赖的对象需要挂接刚体部件。
标签: 弹簧关节 Spring Joint unity3d
【来源:互联网】
更多精彩教程,尽在web3D纳金网http://www.narkii.com/college/




欢迎光临 纳金网 (http://go.narkii.com/club/) Powered by Discuz! X2.5