SlideShare a Scribd company logo
1 of 11
UNITY COOKBOOK
SHOT BY. INS
PART 7
관절의 형용사
관절(Joint)의 종류
‘Joint Component’는 객체와 객체 사이의 뼈대를 이어주는 역할을 합니다.
물론 일반적으로 움직이지 않는 객체에 관절을 붙여주는 행위는 필요없고, 보통 Rigidbody가 적용 된 객체에
Joint를 붙여주는 방식으로 사용됩니다.
여러 개의 Joint를 알아보고 사용 방법에 대해서 알아봅시다.
( 1 / 9 )
Fixed Joint
Fixed Joint는 서로의 객체(Rigidbody)를 붙여주는 역할을 합니다.
막대를 2개 만들고 ‘Rigidbody Component’가 붙어져 있는 상태에서 ‘Fixe Joint’를 붙여주면
두 객체가 한 막대가 된 것 처럼 고정되어 물리가 작용됩니다.
계층구조가 아닌 개별적으로 서로의 객체를 붙여줄 때 사용되기도 하는 편입니다.
( 2 / 9 )
CHANGEBone 1 Bone 2
Hinge Joint #1
Hinge(경첩) Joint는 대상 객체(문)에 경첩을 달듯이 동력이나, 물체를 밀어내는 작용을 표현할 때 사용됩니다.
대상 객체에 붙이고 원하는 기능을 Check 한 뒤 값을 조절하여 사용합니다.
이론만 설명하면 모르니 예제를 보겠습니다.
( 3 / 9 )
연결 대상의 Rigidbody
연결 중심축
축의 지표(각도)
탄성력
동력
움직임 한계점
Hinge Joint #2
Hinge Joint Component를 ‘bone 1’에 붙이고 대상 Rigidbody에 연결 뒤 축과 축의 방향을 변경하였습니다.
그리고 게임을 실행해 보면 축이 붙어있는 관절은 해당 축 대로 꺾여 마치 경첩과도 같은 역할을 할 수 있습니다.
축의 방향과 위치를 잘 조정하여 원하는 기능을 만들도록 하기 위해선 주의를 요구하는 편입니다.
( 4 / 9 )
# 꺾이는 오브젝트
Hinge Joint #3
‘Fixed Joint’, ‘Hinge Joint’를 이용해 자동차를 만들어봅시다.
자동차 몸통과 바퀴를 만들고 바퀴 객체는 Hinge Joint Component를 붙이는데 이 때 설정은 굴러가는 축의 방향으로 잡고
메인이 되는 ‘car’ 객체에 대상 Rigidbody를 적용시킵니다. 나머지 차 몸통은 ‘car’ 객체에 ‘Fixed Joint’로 붙입니다.
그리고 바퀴에 ‘Use Motor’ 체크 뒤 위와 같은 힘과 중력을 주면 움직이는 자동차를 볼 수 있습니다.
( 5 / 9 )
Hinge Joint Axis
# 굴러가는 자동차
Spring Joint
‘Spring Joint’는 두 객체의 탄성력이 일어나는 관절을 말합니다.
두 A, B 객체에 Rigidbody가 심어져 있는 상태에서 ‘Spring Joint Component’를 심어놓고 서로의 객체에 대상을 적용하면
마치 용수철처럼 다시 돌아가려는 관절을 보실 수 있습니다.
( 6 / 9 )
# 탄성이 일어나는 관절
Character Joint #1
‘Character Joint’는 다른 Joint로 연결하는 방식이 같고 기능도 비슷하지만 다양하게 축을 구부리고 펼 수 있다.
‘Ragdoll’ 기능의 Joint 효과로 자주 쓰이며, 관절의 흔들림 까지 지원이 되어 자주 쓰이는 편이다.
다음으로는 지금까지 배운 기능들을 응용으로 해 봅시다.
( 7 / 9 )
Character Joint #2
위 사진과 같이 쇠사슬과 레킹볼을 만들어 ‘Rigidbody Component’과 ‘Character Joint Component’를 붙여줍니다.
레킹볼부터 시작해서 쇠사슬 뿌리부터 대상 Rigidbody를 적용시켜줍니다. 그리고 쇠사슬 제일 끝은 남겨줍니다.
그리고 45도 각도정도로 비스듬하게 배치하고 파괴시킬 큐브 몇 개를 놓고 실행해보면
리얼한 레킹볼이 완성됩니다.
( 8 / 9 )
Ragdoll
마지막으로 ‘Ragdoll’을 알아보도록 하겠습니다.
일단 멋지고 튼튼한 남성 캐릭터를 하나 Asset Store 에서 받습니다. 그리고 Create -> 3D Object -> Ragdoll을 선택한 뒤
남성 캐릭터에 있는 뼈대를 각 위치에 걸맞게 넣어주고 적용합니다. 그럼 지정한 뼈대 객체에 ‘Character Joint’가 심어집니다.
그리고 플레이 해보면 각 관절마다 배치 된 Rigidbody는 영향을 받아 캐릭터가 축 늘어지는 것 처럼 보게되죠.
( 9 / 9 )
End

More Related Content

More from Jihun Soh

Unity cookbook 15
Unity cookbook 15Unity cookbook 15
Unity cookbook 15Jihun Soh
 
Unity cookbook 14
Unity cookbook 14Unity cookbook 14
Unity cookbook 14Jihun Soh
 
Unity cookbook 13
Unity cookbook 13Unity cookbook 13
Unity cookbook 13Jihun Soh
 
Unity cookbook 12
Unity cookbook 12Unity cookbook 12
Unity cookbook 12Jihun Soh
 
Unity cookbook 11
Unity cookbook 11Unity cookbook 11
Unity cookbook 11Jihun Soh
 
Unity cookbook 10
Unity cookbook 10Unity cookbook 10
Unity cookbook 10Jihun Soh
 
Unity cookbook 9
Unity cookbook 9Unity cookbook 9
Unity cookbook 9Jihun Soh
 
Unity cookbook 8
Unity cookbook 8Unity cookbook 8
Unity cookbook 8Jihun Soh
 
Unity cookbook 6
Unity cookbook 6Unity cookbook 6
Unity cookbook 6Jihun Soh
 
Unity cookbook 3
Unity cookbook 3Unity cookbook 3
Unity cookbook 3Jihun Soh
 
Unity cookbook 2
Unity cookbook 2Unity cookbook 2
Unity cookbook 2Jihun Soh
 
Unity cookbook 1
Unity cookbook 1Unity cookbook 1
Unity cookbook 1Jihun Soh
 

More from Jihun Soh (12)

Unity cookbook 15
Unity cookbook 15Unity cookbook 15
Unity cookbook 15
 
Unity cookbook 14
Unity cookbook 14Unity cookbook 14
Unity cookbook 14
 
Unity cookbook 13
Unity cookbook 13Unity cookbook 13
Unity cookbook 13
 
Unity cookbook 12
Unity cookbook 12Unity cookbook 12
Unity cookbook 12
 
Unity cookbook 11
Unity cookbook 11Unity cookbook 11
Unity cookbook 11
 
Unity cookbook 10
Unity cookbook 10Unity cookbook 10
Unity cookbook 10
 
Unity cookbook 9
Unity cookbook 9Unity cookbook 9
Unity cookbook 9
 
Unity cookbook 8
Unity cookbook 8Unity cookbook 8
Unity cookbook 8
 
Unity cookbook 6
Unity cookbook 6Unity cookbook 6
Unity cookbook 6
 
Unity cookbook 3
Unity cookbook 3Unity cookbook 3
Unity cookbook 3
 
Unity cookbook 2
Unity cookbook 2Unity cookbook 2
Unity cookbook 2
 
Unity cookbook 1
Unity cookbook 1Unity cookbook 1
Unity cookbook 1
 

Recently uploaded

Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...Kim Daeun
 
캐드앤그래픽스 2024년 5월호 목차
캐드앤그래픽스 2024년 5월호 목차캐드앤그래픽스 2024년 5월호 목차
캐드앤그래픽스 2024년 5월호 목차캐드앤그래픽스
 
Console API (Kitworks Team Study 백혜인 발표자료)
Console API (Kitworks Team Study 백혜인 발표자료)Console API (Kitworks Team Study 백혜인 발표자료)
Console API (Kitworks Team Study 백혜인 발표자료)Wonjun Hwang
 
A future that integrates LLMs and LAMs (Symposium)
A future that integrates LLMs and LAMs (Symposium)A future that integrates LLMs and LAMs (Symposium)
A future that integrates LLMs and LAMs (Symposium)Tae Young Lee
 
MOODv2 : Masked Image Modeling for Out-of-Distribution Detection
MOODv2 : Masked Image Modeling for Out-of-Distribution DetectionMOODv2 : Masked Image Modeling for Out-of-Distribution Detection
MOODv2 : Masked Image Modeling for Out-of-Distribution DetectionKim Daeun
 
Merge (Kitworks Team Study 이성수 발표자료 240426)
Merge (Kitworks Team Study 이성수 발표자료 240426)Merge (Kitworks Team Study 이성수 발표자료 240426)
Merge (Kitworks Team Study 이성수 발표자료 240426)Wonjun Hwang
 

Recently uploaded (6)

Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
 
캐드앤그래픽스 2024년 5월호 목차
캐드앤그래픽스 2024년 5월호 목차캐드앤그래픽스 2024년 5월호 목차
캐드앤그래픽스 2024년 5월호 목차
 
Console API (Kitworks Team Study 백혜인 발표자료)
Console API (Kitworks Team Study 백혜인 발표자료)Console API (Kitworks Team Study 백혜인 발표자료)
Console API (Kitworks Team Study 백혜인 발표자료)
 
A future that integrates LLMs and LAMs (Symposium)
A future that integrates LLMs and LAMs (Symposium)A future that integrates LLMs and LAMs (Symposium)
A future that integrates LLMs and LAMs (Symposium)
 
MOODv2 : Masked Image Modeling for Out-of-Distribution Detection
MOODv2 : Masked Image Modeling for Out-of-Distribution DetectionMOODv2 : Masked Image Modeling for Out-of-Distribution Detection
MOODv2 : Masked Image Modeling for Out-of-Distribution Detection
 
Merge (Kitworks Team Study 이성수 발표자료 240426)
Merge (Kitworks Team Study 이성수 발표자료 240426)Merge (Kitworks Team Study 이성수 발표자료 240426)
Merge (Kitworks Team Study 이성수 발표자료 240426)
 

Unity cookbook 7

  • 1. UNITY COOKBOOK SHOT BY. INS PART 7 관절의 형용사
  • 2. 관절(Joint)의 종류 ‘Joint Component’는 객체와 객체 사이의 뼈대를 이어주는 역할을 합니다. 물론 일반적으로 움직이지 않는 객체에 관절을 붙여주는 행위는 필요없고, 보통 Rigidbody가 적용 된 객체에 Joint를 붙여주는 방식으로 사용됩니다. 여러 개의 Joint를 알아보고 사용 방법에 대해서 알아봅시다. ( 1 / 9 )
  • 3. Fixed Joint Fixed Joint는 서로의 객체(Rigidbody)를 붙여주는 역할을 합니다. 막대를 2개 만들고 ‘Rigidbody Component’가 붙어져 있는 상태에서 ‘Fixe Joint’를 붙여주면 두 객체가 한 막대가 된 것 처럼 고정되어 물리가 작용됩니다. 계층구조가 아닌 개별적으로 서로의 객체를 붙여줄 때 사용되기도 하는 편입니다. ( 2 / 9 ) CHANGEBone 1 Bone 2
  • 4. Hinge Joint #1 Hinge(경첩) Joint는 대상 객체(문)에 경첩을 달듯이 동력이나, 물체를 밀어내는 작용을 표현할 때 사용됩니다. 대상 객체에 붙이고 원하는 기능을 Check 한 뒤 값을 조절하여 사용합니다. 이론만 설명하면 모르니 예제를 보겠습니다. ( 3 / 9 ) 연결 대상의 Rigidbody 연결 중심축 축의 지표(각도) 탄성력 동력 움직임 한계점
  • 5. Hinge Joint #2 Hinge Joint Component를 ‘bone 1’에 붙이고 대상 Rigidbody에 연결 뒤 축과 축의 방향을 변경하였습니다. 그리고 게임을 실행해 보면 축이 붙어있는 관절은 해당 축 대로 꺾여 마치 경첩과도 같은 역할을 할 수 있습니다. 축의 방향과 위치를 잘 조정하여 원하는 기능을 만들도록 하기 위해선 주의를 요구하는 편입니다. ( 4 / 9 ) # 꺾이는 오브젝트
  • 6. Hinge Joint #3 ‘Fixed Joint’, ‘Hinge Joint’를 이용해 자동차를 만들어봅시다. 자동차 몸통과 바퀴를 만들고 바퀴 객체는 Hinge Joint Component를 붙이는데 이 때 설정은 굴러가는 축의 방향으로 잡고 메인이 되는 ‘car’ 객체에 대상 Rigidbody를 적용시킵니다. 나머지 차 몸통은 ‘car’ 객체에 ‘Fixed Joint’로 붙입니다. 그리고 바퀴에 ‘Use Motor’ 체크 뒤 위와 같은 힘과 중력을 주면 움직이는 자동차를 볼 수 있습니다. ( 5 / 9 ) Hinge Joint Axis # 굴러가는 자동차
  • 7. Spring Joint ‘Spring Joint’는 두 객체의 탄성력이 일어나는 관절을 말합니다. 두 A, B 객체에 Rigidbody가 심어져 있는 상태에서 ‘Spring Joint Component’를 심어놓고 서로의 객체에 대상을 적용하면 마치 용수철처럼 다시 돌아가려는 관절을 보실 수 있습니다. ( 6 / 9 ) # 탄성이 일어나는 관절
  • 8. Character Joint #1 ‘Character Joint’는 다른 Joint로 연결하는 방식이 같고 기능도 비슷하지만 다양하게 축을 구부리고 펼 수 있다. ‘Ragdoll’ 기능의 Joint 효과로 자주 쓰이며, 관절의 흔들림 까지 지원이 되어 자주 쓰이는 편이다. 다음으로는 지금까지 배운 기능들을 응용으로 해 봅시다. ( 7 / 9 )
  • 9. Character Joint #2 위 사진과 같이 쇠사슬과 레킹볼을 만들어 ‘Rigidbody Component’과 ‘Character Joint Component’를 붙여줍니다. 레킹볼부터 시작해서 쇠사슬 뿌리부터 대상 Rigidbody를 적용시켜줍니다. 그리고 쇠사슬 제일 끝은 남겨줍니다. 그리고 45도 각도정도로 비스듬하게 배치하고 파괴시킬 큐브 몇 개를 놓고 실행해보면 리얼한 레킹볼이 완성됩니다. ( 8 / 9 )
  • 10. Ragdoll 마지막으로 ‘Ragdoll’을 알아보도록 하겠습니다. 일단 멋지고 튼튼한 남성 캐릭터를 하나 Asset Store 에서 받습니다. 그리고 Create -> 3D Object -> Ragdoll을 선택한 뒤 남성 캐릭터에 있는 뼈대를 각 위치에 걸맞게 넣어주고 적용합니다. 그럼 지정한 뼈대 객체에 ‘Character Joint’가 심어집니다. 그리고 플레이 해보면 각 관절마다 배치 된 Rigidbody는 영향을 받아 캐릭터가 축 늘어지는 것 처럼 보게되죠. ( 9 / 9 )
  • 11. End