스크롤방법
1. 오브젝트를 직접 이동하는 방법(Transform 사용)
2. 오브젝트의 메트리얼의 Offset 값을 이동하는 방법
2번의 방법이 구현이 간단함.
배경이 지속적으로 변하는 게 아니라면 2번의 방법으로 구현하는게 좋은거 같습니다.
아래는 종 방향으로 스크롤 되는 예제입니다.
횡방향인 경우에는
로 하면 되겠죠?
메트리얼의 Offset은 ViewPort 좌표계를 사용합니다 0~1 인 상대좌표계이죠.
만약에 1이상인 경우에는 정수 부분을 무시해 버립니다. 그래서 위의 스크립트가 정상 작동 하는 것이죠.
'유니티 > 스크립트' 카테고리의 다른 글
| 유니티 WorldToScreenPoint를 사용하여 좌우 이동을 제한하는 스크립트 (0) | 2014.01.28 |
|---|---|
| 유니티 오브젝트 키보드로 움직이기 (0) | 2014.01.28 |
| 배경화면 스크롤 방법 (0) | 2014.01.28 |
| 제트기 뒤 분화구 파티클 패키지 파일 (0) | 2014.01.28 |
| 유니티 파티클 관련 속성 값 (Elipsoid Particle Emitter, Particle Animator, Particle Renderer) (0) | 2014.01.28 |
| 3D 오브젝트 파일 콜라이더 생성 Generate Colliders (0) | 2014.01.28 |
Trackback 0 And
Comment 0
'유니티 > 스크립트' 카테고리의 다른 글
| 유니티 오브젝트 키보드로 움직이기 (0) | 2014.01.28 |
|---|---|
| 배경화면 스크롤 방법 (0) | 2014.01.28 |
| 제트기 뒤 분화구 파티클 패키지 파일 (0) | 2014.01.28 |
| 유니티 파티클 관련 속성 값 (Elipsoid Particle Emitter, Particle Animator, Particle Renderer) (0) | 2014.01.28 |
| 3D 오브젝트 파일 콜라이더 생성 Generate Colliders (0) | 2014.01.28 |
| ScreenToWorldPoint 사용시 (0) | 2014.01.28 |
Trackback 0 And
Comment 0
유니티 파티클 관련 속성 값 (Elipsoid Particle Emitter, Particle Animator, Particle Renderer)
| 유니티/스크립트 2014. 1. 28. 14:30유니티의 파티클 관련 속성 값
Properties
| Emit | If enabled, the emitter will emit particles. |
| Min Size | 각 입자의 최소 크기. |
| Max Size | 각 입자의 최대 크기. |
| Min Energy | 입자의 초단위 최소 수명. |
| Max Energy | 입자의 초단위 최대 수명. |
| Min Emission | 매초 만드는 입자의 최소 수. |
| Max Emission | 매초 만드는 입자의 최대 수. |
| World Velocity | 월드 기준 입자의 확산 방향 및 속도. |
| Local Velocity | 로컬 기준 입자의 확산 방향 및 속도. |
| Rnd Velocity | 입자의 확상 방향 및 속도 랜덤 값. |
| Emitter Velocity Scale | The amount of the emitter's speed that the particles inherit. |
| Tangent Velocity | The starting speed of particles along X, Y, and Z, across the Emitter's surface. |
| Angular Velocity | The angular velocity of new particles in degrees per second. |
| Rnd Angular Velocity | A random angular velocity modifier for new particles. |
| Rnd Rotation | If enabled, the particles will be spawned with random rotations. |
| Simulate In World Space | 이동시 궤적 표시 금지. |
| One Shot | If enabled, the particle numbers specified by min & max emission is spawned all at once. If disabled, the particles are generated in a long stream. |
| Ellipsoid | 입자 생성 범위. |
| MinEmitterRange | Determines an empty area in the center of the sphere - use this to make particles appear on the edge of the sphere. |
Properties
| Does Animate Color | If enabled, particles cycle their color over their lifetime. |
| Color Animation | 5가지의 생상에 따라 입자의 색상이 변화됨. |
| World Rotation Axis | An optional world-space axis the particles rotate around. Use this to make advanced spell effects or give caustic bubbles some life. |
| Local Rotation Axis | An optional local-space axis the particles rotate around. Use this to make advanced spell effects or give caustic bubbles some life. |
| Size Grow | Use this to make particles grow in size over their lifetime. As randomized forces will spread your particles out, it is often nice to make them grow in size so they don't fall apart. Use this to make smoke rise upwards, to simulate wind, etc. |
| Rnd Force | A random force added to particles every frame. Use this to make smoke become more alive. |
| Force | The force being applied every frame to the particles, measure relative to the world. |
| Damping | How much particles are slowed every frame. A value of 1 gives no damping, while less makes them slow down. |
| Autodestruct | If enabled, the GameObject attached to the Particle Animator will be destroyed when all particles disappear. |
Properties
| Cast Shadows | If enabled, allows object to cast shadows. |
| Receive Shadows | If enabled, allows object to receive shadows. |
| Materials | Reference to a list of Materials that will be displayed in the position of each individual particle. |
| Use Light Probes | If enabled and baked light probes are present in the scene, an interpolated light probe. |
| Light Probe Anchor | If set, Renderer will use this Transform's position to find the interpolated light probe. |
| Camera Velocity Scale | The amount of stretching that is applied to the Particles based on Camera movement. |
| Stretch Particles | Determines how the particles are rendered. |
| Billboard | The particles are rendered as if facing the camera. |
| Stretched | The particles are facing the direction they are moving. |
| SortedBillboard | The particles are sorted by depth. Use this when using a blending material. |
| VerticalBillboard | All particles are aligned flat along the X/Z axes. |
| HorizontalBillboard | All particles are aligned flat along the X/Y axes. |
| Length Scale | If Stretch Particles is set to Stretched, this value determines how long the particles are in their direction of motion. |
| Velocity Scale | If Stretch Particles is set to Stretched, this value determines the rate at which particles will be stretched, based on their movement speed. |
| UV Animation | If either of these are set, the UV coordinates of the particles will be generated for use with a tile animated texture. See the section on Animated Textures below. |
| X Tile | Number of frames located across the X axis. |
| Y Tile | Number of frames located across the Y axis. |
| Cycles | How many times to loop the animation sequence. |
'유니티 > 스크립트' 카테고리의 다른 글
| 배경화면 스크롤 방법 (0) | 2014.01.28 |
|---|---|
| 제트기 뒤 분화구 파티클 패키지 파일 (0) | 2014.01.28 |
| 유니티 파티클 관련 속성 값 (Elipsoid Particle Emitter, Particle Animator, Particle Renderer) (0) | 2014.01.28 |
| 3D 오브젝트 파일 콜라이더 생성 Generate Colliders (0) | 2014.01.28 |
| ScreenToWorldPoint 사용시 (0) | 2014.01.28 |
| 유니티 카메라 관련 좌표값 변경 스크립트들 (1) | 2014.01.28 |
Trackback 1 And
Comment 0
JetFire.unitypackage

