Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mecanim #2

Open
tzutzu858 opened this issue Apr 9, 2020 · 6 comments
Open

Mecanim #2

tzutzu858 opened this issue Apr 9, 2020 · 6 comments

Comments

@tzutzu858
Copy link
Owner

Mecanim是從建立到播放都可以執行的功能
使用Mecanim時,只要在設計遊戲時先做好各個動畫
並指定好各個動畫的切換時間點就可以了
遊戲執行時,Mecanim會判斷物件的狀態並自動切換與撥放動畫

@tzutzu858
Copy link
Owner Author

tzutzu858 commented Apr 9, 2020

Animation Clip
把分散的圖片整合在一起就是Animation Clip
譬如「走路動畫」和「跳躍動畫」
每個動畫都有一個Animation Clip
在Animation Clip可以設定圖片資料、撥放速度、撥放時間等

Animation視窗/左上方Add Property/Sprite Renderer/Sprite/+

@tzutzu858
Copy link
Owner Author

tzutzu858 commented Apr 9, 2020

把Animation Clip統整起來就是Animator Controller
在Animator Controller可以指定在哪個時間點撥放Animation Clip

@tzutzu858
Copy link
Owner Author

要先把Animator元件附加到動作物件才能設定元件的Animator Controller
然後再撥放Animator Controller所設定的動畫

@tzutzu858
Copy link
Owner Author

player/工具列Window/Animation
animation視窗/Create New Clip/設檔名
設定動畫時間軸:Add Property/Sprite Renderer/Sprite「+」

@tzutzu858
Copy link
Owner Author

節點的功能
Entry:動畫開始時從Entry節點開始切換
Any State:不管目前狀態,直接切換到指定動畫
Exit:動畫結束時切換到Exit節點

@tzutzu858
Copy link
Owner Author

切換條件的參數:
Has Exit Time:動畫播放結束時是否自動切換到別的動畫
Exit Time:以影片長度(0.01.0完整播放)設定動畫結束時間
Transition Duration:以影片長度(0.0
1.0完整播放)設定切換到下一個動畫的時間
Transition Offset:以影片長度(0.0~1.0完整播放)設定下一個動畫開始的時間

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant