휠 조인트 2D(Wheel 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. |
Damping Ratio | The degree to which you want to suppress spring oscillation in the suspension: In the range 0 to 1, the higher the value, the less movement. |
Frequency | The frequency at which the spring in the suspension 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 suspension spring. |
Angle | The world movement angle for the suspension. |
Use Motor | Apply a motor force to the wheel? Check the box for yes. |
Motor | |
Motor Speed | Target speed (degrees per second) for the motor to reach. |
Maximum Motor Force | Maximum force applied to the object to attain the desired speed. |
Break Force | Specify the force level needed to break and so delete the joint. Infinity means it is unbreakable. |
Break Torque | Specify the torque level needed to break and so delete the joint. Infinity means it is unbreakable. |
모든 2D 조인트의 유용한 배경 정보에 대한 세부 정보 및 힌트는 조인트 2D를 참조하십시오.
이 조인트를 사용하여 휠과 서스펜션을 시뮬레이션해야 합니다. 이 조인트의 목적은 무한하게 확장하는 선 위 두 포인트의 포지션을 유지하며 그와 동시에 오버랩하는 것입니다. 이 두 포인트는 두 개의 Rigidbody2D 컴포넌트일 수도 있고 한 개의 Rigidbody2D 컴포넌트와 월드에 고정된 한 포지션일 수도 있습니다. Connected Rigidbody 를 없음으로 설정하면 월드 내의 고정된 포지션에 연결됩니다.
휠 조인트 2D는 슬라이더 조인트 2D(모터나 한계 제한 없음) 및 힌지 조인트 2D(한계 제한 없음)을 조합한 것과 같이 움직입니다.
조인트는 라인 유지를 위한 연결된 리지드바디 오브젝트, 라인에서 오브젝트를 회전시키는 앵글 모터, 휠 서스펜션을 시뮬레이션하는 스프링에 직선 운동의 힘을 적용합니다.
Maximum Motor Speed 및 Maximum Motor Force(이 조인트의 토크)를 설정하여 앵글 모터 속도를 조절하고 두 리지드바디 오브젝트를 회전시켜야 합니다.
휠 서스펜션의 뻑뻑함 및 움직임을 설정할 수 있습니다.
뻑뻑하고 거의 움직이지 않는 서스펜션…
높은(최고 1,000,000) Frequency == 서스펜션이 뻑뻑합니다.
높은(최고 1) Damping Ratio == 서스펜션이 거의 움직이지 않습니다.
느슨하고 움직이는 서스펜션…
낮은 Frequency == 서스펜션이 느슨합니다.
낮은 Damping Ratio == 서스펜션이 움직입니다.
두 시뮬레이션 제약이 존재합니다.
예제:
이 조인트를 사용하여 회전하지만 지정한 라인으로부터 떨어질 수 없는 피벗으로 연결된 것처럼 움직여야 하는 실제 오브젝트를 구성할 수 있습니다. 예를 들면 다음과 같습니다.
휠 조인트 2D는 휠 콜라이더와 다르게 움직입니다.
3D 물리에 사용하는 휠 콜라이더와는 달리 휠 조인트 2D는 휠에 개별 Rigidbody 오브젝트를 사용하여 힘이 작용하면 회전합니다. 그에 비해 휠 콜라이더는 레이캐스트를 사용하여 서스펜션을 시뮬레이션하고, 휠의 회전은 순수한 그래픽 효과입니다. 휠 오브젝트는 일반적으로 게임플레이에 적합한 견인력을 제공하는 물리 머티리얼 2D와 써클 콜라이더 2D입니다.
차량 또는 다른 운송 수단을 시뮬레이션하려면:
인스펙터에서 Motor Speed 프로퍼티를 0으로 설정하면 플레이어의 입력에 따라 스크립트에서 변합니다. Maximum Motor Force 값을 변경하여 기어 변화나 파워업 효과를 시뮬레이션할 수 있습니다.
빈도 0:
Frequency 0은 특별한 경우로, 스프링을 최대한 뻑뻑하게 만듭니다.
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.