用户工具

站点工具


侧边栏



Unity3D中文文档

script:unityengine:classes:targetjoint2d:targetjoint2d

TargetJoint2D 2D目标关节

class in UnityEngine/Inherits from: Joint2D

Description 描述

The joint attempts to move a Rigidbody2D to a specific target position.

该关节尝试移动2D刚体到达指定目标位置。

This joint is the only joint that doesn't connect two Rigidbody2D together. Instead, it only operates on the single body it is connected to.

该关节是唯一不连接两个2D刚体到一起的关节。相反,它仅对它连接的单一主体进行操作。

When connected, it will attempt to move the body to a specified target position. When setting a target you can also set the anchor position which is a point relative to the Rigidbody2D where forces will be applied.

连接时,它将尝试去移动主体到指定的目标位置。当设置目标位置时,你也可以设置相对于2D刚体的锚点位置。

The joint moves the body using a configurable spring that has a force limit.

该关节移动主体使用可配置的有力限制的弹力结构。

An example usage for this joint might be to enable Collider2D to be dragged, selecting an anchor point and moving the body to the position under the mouse.

该关节使用的示例可能启用Collider2D,使用鼠标选择锚点和移动身体到该位置。

Variables 变量

anchorThe local-space anchor on the rigid-body the joint is attached to.
该关节附加的刚体的自身空间锚点。
autoConfigureTargetShould the target be calculated automatically?
是否自动计算目标?
dampingRatioThe amount by which the target spring force is reduced in proportion to the movement speed.
目标弹力减少的运动速度的总数的比率。
frequencyThe frequency at which the target spring oscillates around the target position.
目标弹力结构围绕目标位置振荡的频率。
maxForceThe maximum force that can be generated when trying to maintain the target joint constraint.
当尝试维持目标关节的约束力时产生的最大力。
targetThe world-space position that the joint will attempt to move the body to.
该关节尝试移动该身体到达的位置的世界空间位置。
script/unityengine/classes/targetjoint2d/targetjoint2d.txt · 最后更改: 2016/08/02 05:33 (外部编辑)