Version: 2022.2
언어: 한국어
Spring Joint 2D
휠 조인트 2D

Target Joint 2D

This joint connects to a specified target, rather than another Rigidbody object as other joints do. This behaves in a similar way to a spring type joint.

프로퍼티 기능
Anchor Define where (in terms of x, y-coordinates on the Rigidbody 2D) the end point of the joint connects to this GameObject.
Target Define where (in terms of x, y-coordinates in world space) the other end of the joint attempts to move.
Auto Configure Target Enable this property to automatically set the other end of the joint to the current position of the GameObject. Note: When this option is enabled, the target changes as you move the GameObject but the target will not change if the option is not enabled.
Max Force Set the force that the joint can apply when attempting to move the object to the target position. The higher the value, the higher the maximum force.
Damping Ratio Set the degree to suppress spring oscillation. In the range 0 to 1, the higher the value, the less movement.
Frequency Set the frequency at which the spring oscillates while the GameObjects are approaching the separation distance you want (measured in cycles per second). In the range 0 to 1,000,000 - the higher the value, the stiffer the spring. Note: Setting Frequency to zero will create the stiffest spring type joint possible.
Break Action Set the action taken when either the force or torque threshold is exceeded.
Break Force Set the force threshold which if exceeded, will cause the joint to perform the selected Break Action. The default value is set to Infinity, which can never be exceeded and therefore the Break Action can never be taken while the threshold remains at this value.

Using this joint

Use this joint to connect a Rigidbody GameObject to a point in space. The aim of this joint is to keep zero linear distance between two points: An anchor point on a Rigidbody object and a world space position, called the “Target”. The joint applies linear force to the Rigidbody object, it does not apply torque (angular force).

The joint uses a simulated spring. You can set the spring’s stiffness and movement by adjusting its settings. For example, to set a stiff and barely moving spring:

  • Set a high (1,000,000 is the highest) Frequency == a stiff spring.

  • Set a high (1 is the highest) Damping Ratio == a barely moving spring.

To simulate a looser and more freely moving spring, you would use the following settings:

  • Set a low Frequency == a loose spring.

  • Set a low Damping Ratio == a moving spring.

When the spring applies its force between the Rigidbody object and target, it tends to overshoot the distance you have set between them, and then rebound repeatedly, giving in a continuous oscillation. The Damping Ratio sets how quickly the Rigidbody object stops moving. The Frequency sets how quickly the Rigidbody object oscillates either side of the distance you have specified.

이 조인트에는 한 가지 제약이 있습니다.

  • Maintain a zero linear distance between the anchor point on a Rigidbody object and a world space position (Target).

You can use this joint to construct physical objects that need to move to designated target positions and stay there until another target position is selected or the target is cleared. For example:

  • 마우스 클릭으로 케이크를 들고 접시에 드래그하는 게임. 이 조인트를 사용하여 케이크를 접시로 옮길 수 있습니다.

조인트를 사용하여 오브젝트를 정지시킬 수도 있습니다. 앵커 포인트가 질량 중심이 아닌 경우 오브젝트가 회전합니다. 예를 들면 다음과 같습니다.

  • 상자를 드는 게임. 마우스를 클릭하여 상자를 코너까지 드래그하면 커서에서 멈춥니다.

추가 리소스

  • Refer to Joints 2D for more information about other 2D Joints.

TargetJoint2D

Spring Joint 2D
휠 조인트 2D
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961