반응형
Notice
Recent Posts
Recent Comments
«   2025/01   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
Archives
Today
Total
관리 메뉴

Do Something IT

[Unity3D] Shake Object 본문

Unity3D

[Unity3D] Shake Object

아낙시만더 2015. 2. 24. 18:23
반응형

퍼온곳 바로가기

After much Googleing for how to do a camera shaking effect in Unity, I decided to write my own small script to accomplish the effect. It combines both positional movement with rotational movement to simulate closely an actual camera shake.

The two key variables are:

shake_intensity

Shake_intensity determines the initial intensity of the shaking — how much variance to allow in the camera position.

shake_decay

Shake_decay controls is the amount that shake_intensity is decremented each update. It determines if the shake is long or short.

 

 

 

 

Unity Web Player. Install now!

 

 

 

JavaScript

C# (c# port by commenter georgeegonut. Thanks George!)

 

반응형
Comments