http://www.raywenderlich.com/ko/26316/%EC%9C%A0%EB%8B%88%ED%8B%B0%EB%A5%BC-%EC%82%AC%EC%9A%A9%ED%95%98%EC%97%AC-2-5d-%EA%B2%8C%EC%9E%84%EC%9D%84-%EB%A7%8C%EB%93%9C%EB%8A%94-%EB%B0%A9%EB%B2%95-%ED%8A%9C%ED%86%A0%EB%A6%AC%EC%96%BC
'유니티 > Note' 카테고리의 다른 글
| 샌드박스형 게임이란(마인크래프트 , GTA 등) (0) | 2014.02.04 |
|---|---|
| 유니티3D 엔진이 가지는 의미 (0) | 2014.02.02 |
| 유니티를 사용하여 2.5D 게임을 만드는 방법 (0) | 2014.01.31 |
| BoxRunner(유나이트 2013 - 워크샵 프로그램) (0) | 2014.01.29 |
| TTclock (0) | 2014.01.27 |
| 싱글턴 (0) | 2014.01.27 |
Rigidbody 2D
A Rigidbody 2D component places an object under the control of the physics engine. Many concepts familiar from the standard Rigidbody component carry over to Rigidbody 2D, with the difference that in 2D, objects can only move in the XY plane and can only rotate on an axis perpendicular to that plane.
| Mass | Mass of the rigidbody. |
| Linear Drag | Drag coefficient affecting positional movement. |
| Angular Drag | Drag coefficient affecting rotational movement. |
| Gravity Scale | Degree to which the object is affected by gravity. |
| Fixed Angle | 리지드 바디에 힘을 가할때 회전을 적용할지 여부 체크하면 회전이 안됨 |
| Is Kinematic | Is the rigidbody moved by forces and collisions? |
| Interpolate | How the object's movement is interpolated between physics updates (useful when motion tends to be jerky). |
| None | No movement smoothing is applied. |
| Interpolate | Movement is smoothed based on the object's positions in previous frames. |
| Extrapolate | Movement is smoothed based on an estimate of its position in the next frame. |
| Sleeping Mode | How the object "sleeps" to save processor time when it is at rest. |
| Never Sleep | Sleeping is disabled. |
| Start Awake | Object is initially awake. |
| Start Asleep | Object is initially asleep but can be woken by collisions. |
| Collision Detection | How collisions with other objects are detected. |
| Discrete | A collision is registered only if the object's collider is in contact with another during a physics update. |
| Continuous | A collision is registered if the object's collider appears to have contacted another between updates. |
Details
Adding a Rigidbody 2D allows a sprite to be moved in a physically convincing way by applying forces from the scripting API. When the appropriate collider component is also attached to the sprite object, it will be affected by collisions with other moving objects. Using physics simplifies many common gameplay mechanics and allows for realistic, emergent behaviour with minimal coding.
Colliders
Colliders define an approximate shape for an object that will be used by the physics engine to determine collisions with other objects. The collider types that can be used with Rigidbody 2D are the Circle Collider 2D, Box Collider 2D and Polygon Collider 2D - see the pages for these component for further details.
Kinematic Rigidbodies
The Is Kinematic setting switches off the physical behaviour of the Rigidbody 2D so that it will not react to gravity and collisions. This is typically used to keep an object under non-physical script control most of the time but then switch to physics in a particular situation. For example, a player might normally move by walking (better handled without physics) but then get catapulted into the air by an explosion or strike. Physics can be used to create the catapulting effect if you switch off ''Is Kinematic" just before applying a large force to the object.
Page last updated: 2013-08-15
Rigidbody 2D
A Rigidbody 2D component places an object under the control of the physics engine. Many concepts familiar from the standard Rigidbody component carry over to Rigidbody 2D, with the difference that in 2D, objects can only move in the XY plane and can only rotate on an axis perpendicular to that plane.
| Mass | Mass of the rigidbody. |
| Linear Drag | Drag coefficient affecting positional movement. |
| Angular Drag | Drag coefficient affecting rotational movement. |
| Gravity Scale | Degree to which the object is affected by gravity. |
| Fixed Angle | Can the rigidbody rotate when forces are applied? |
| Is Kinematic | Is the rigidbody moved by forces and collisions? |
| Interpolate | How the object's movement is interpolated between physics updates (useful when motion tends to be jerky). |
| None | No movement smoothing is applied. |
| Interpolate | Movement is smoothed based on the object's positions in previous frames. |
| Extrapolate | Movement is smoothed based on an estimate of its position in the next frame. |
| Sleeping Mode | How the object "sleeps" to save processor time when it is at rest. |
| Never Sleep | Sleeping is disabled. |
| Start Awake | Object is initially awake. |
| Start Asleep | Object is initially asleep but can be woken by collisions. |
| Collision Detection | How collisions with other objects are detected. |
| Discrete | A collision is registered only if the object's collider is in contact with another during a physics update. |
| Continuous | A collision is registered if the object's collider appears to have contacted another between updates. |
Details
Adding a Rigidbody 2D allows a sprite to be moved in a physically convincing way by applying forces from the scripting API. When the appropriate collider component is also attached to the sprite object, it will be affected by collisions with other moving objects. Using physics simplifies many common gameplay mechanics and allows for realistic, emergent behaviour with minimal coding.
Colliders
Colliders define an approximate shape for an object that will be used by the physics engine to determine collisions with other objects. The collider types that can be used with Rigidbody 2D are the Circle Collider 2D, Box Collider 2D and Polygon Collider 2D - see the pages for these component for further details.
Kinematic Rigidbodies
The Is Kinematic setting switches off the physical behaviour of the Rigidbody 2D so that it will not react to gravity and collisions. This is typically used to keep an object under non-physical script control most of the time but then switch to physics in a particular situation. For example, a player might normally move by walking (better handled without physics) but then get catapulted into the air by an explosion or strike. Physics can be used to create the catapulting effect if you switch off ''Is Kinematic" just before applying a large force to the object.
Page last updated: 2013-08-15
'유니티 > 스크립트' 카테고리의 다른 글
| 유니티 c# 의 딜리게이트와 이벤트 사용 방법 (0) | 2014.02.02 |
|---|---|
| 유니티 전용 싱글톤 패턴 (0) | 2014.02.01 |
| Rigidbody 2D (0) | 2014.01.30 |
| 점프게임 관련 발판 생성 스크립트 (0) | 2014.01.29 |
| 유니티 점프 게임 구현시 카메라 이동 (2) | 2014.01.29 |
| [펌] 물리엔진을 사용하지 않고 점프 구현 하기 (0) | 2014.01.29 |
점프게임 관련 아이템 생성 스크립트.
점프게임 구현시 발판을 플레이어가 점프할때 마다 위에서 계속해서 생성해줘야된다.
플레이어의 점프 높이와 간격등을 고려해서 구현해야됨.
프리팹을 생성후. 일정높이에서 spPoint를 만들고 spPoint의 위치에서 생성해준다.
그리고 그 전 생성 위치와 비교를 해서 생성해준다.
'유니티 > 스크립트' 카테고리의 다른 글
| 유니티 전용 싱글톤 패턴 (0) | 2014.02.01 |
|---|---|
| Rigidbody 2D (0) | 2014.01.30 |
| 점프게임 관련 발판 생성 스크립트 (0) | 2014.01.29 |
| 유니티 점프 게임 구현시 카메라 이동 (2) | 2014.01.29 |
| [펌] 물리엔진을 사용하지 않고 점프 구현 하기 (0) | 2014.01.29 |
| 플레이어 점프 구현 하기 (레이캐스트 사용) (1) | 2014.01.29 |


