스프링 조인트 2D(Spring Joint 2D) 컴포넌트는 리지드바디 물리가 제어하는 두 게임 오브젝트가 스프링처럼 서로 붙어있게 합니다. 스프링은 두 오브젝트 사이의 축을 따라 힘을 적용하여 둘이 일정 거리를 유지하도록 합니다.
프로퍼티: | 기능: |
---|---|
Enable Collision | 연결된 두 오브젝트가 서로 충돌할 수 있다면 체크박스를 선택해야 합니다. |
Connected Rigid Body | 여기에서는 조인트가 연결된 다른 오브젝트를 지정합니다. None 으로 두면 조인트의 다른 쪽 끝은 Connected Anchor 설정에서 정의한 공간상 한 포인트에 고정됩니다. 연결할 오브젝트 리스트를 보려면 필드 오른쪽의 원을 선택해야 합니다. |
Auto Configure Connected Anchor | 여기에 체크하면 조인트가 연결된 다른 오브젝트의 앵커 위치를 자동으로 설정합니다(Connected Anchor 필드를 완성하는 대신 여기에 체크해야 합니다). |
Anchor | The place (in terms of X, Y co-ordinates on the RigidBody) where the end point of the joint connects to this object. |
Connected Anchor | The place (in terms of X, Y co-ordinates on the RigidBody) where the end point of the joint connects to the other object. |
Auto Configure Distance | Check this box to automtically detect the distance between the two objects and set it as the distance that the joint keeps between the two objects. |
Distance | The distance that the spring should attempt to maintain between the two objects. (Can be set manually.) |
Damping Ratio | The degree to which you want to suppress spring oscillation: In the range 0 to 1, the higher the value, the less movement. |
Frequency | The frequency at which the spring oscillates while the objects 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. |
Break Force | Specify the force level needed to break and so delete the joint. Infinity means it is unbreakable. |
모든 2D 조인트의 유용한 배경 정보에 대한 세부 정보 및 힌트는 조인트 2D를 참조하십시오.
이 조인트는 스프링처럼 작동하며 목적은 두 포인트 사이의 선형 거리를 유지하는 것입니다. Distance 에서 설정할 수 있습니다. 이 두 포인트는 두 개의 Rigidbody2D 컴포넌트일 수도 있고 한 개의 Rigidbody2D 컴포넌트와 월드에 고정된 한 포지션일 수도 있습니다. Connected Rigidbody 를 없음으로 설정하면 월드 내의 고정된 포지션에 연결됩니다. 조인트는 리지드 바디 모두에 직선 운동의 힘을 적용하지만 토크(회전 운동의 힘)는 적용하지 않습니다.
조인트는 시뮬레이션된 스프링을 사용합니다. 스프링 강도 및 움직임을 다음과 같이 설정할 수 있습니다.
경직되어 있고 거의 움직이지 않는 스프링…
높은 (최고 1,000,000) Frequency == 스프링이 뻑뻑합니다.
높은 (최고 1) Damping Ratio == 스프링이 거의 움직이지 않습니다.
느슨하고 움직이는 스프링…
낮은 Frequency == 스프링이 느슨합니다.
낮은 Damping Ratio == 스프링이 움직입니다.
스프링이 오브젝트 사이에 힘을 가하면 반복하여 설정한 거리를 오버슈트하다 축소하는 경향이 있으므로 진동이 지속적으로 발생합니다. Damping Ratio 는 오브젝트의 움직임이 멈추는 속도를 결정합니다. Frequency 는 타겟 거리 양쪽에서 오브젝트가 진동하는 속도를 설정합니다.
이 조인트에는 한 가지 제약이 있습니다.
예제:
이 조인트를 사용하여 회전을 허용하는 스프링 또는 연결을 사용하여 서로 연결되어 있는 것처럼 반응해야 하는 실제 오브젝트를 구성할 수 있습니다. 예를 들면 다음과 같습니다.
힌트:
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.