服を変える方法(animation設定からexmの設定まで)
![](https://i0.wp.com/zzznorth.cybergence.net/wp-content/uploads/2023/02/image-24.png?fit=1024%2C576)
知り合いに向けての記事です。
~きょうのもくひょう~
服を変えるためのanimationを作る
exmの設定とfxの設定をする
動く!
・今日の犠牲者と服
【3Dモデル】Suit for grus – RAKO – BOOTH
・手順
★animation作成
![](https://i0.wp.com/zzznorth.cybergence.net/wp-content/uploads/2023/02/image.png?resize=1024%2C575)
とりあえずアバターを出す 可愛いね
![](https://i0.wp.com/zzznorth.cybergence.net/wp-content/uploads/2023/02/image-1.png?resize=1024%2C575)
服も入れる
![](https://i0.wp.com/zzznorth.cybergence.net/wp-content/uploads/2023/02/image-3.png?resize=1024%2C575)
animationを作る
![](https://i0.wp.com/zzznorth.cybergence.net/wp-content/uploads/2023/02/image-4.png?resize=256%2C123)
適当に名前つけよう
![](https://i0.wp.com/zzznorth.cybergence.net/wp-content/uploads/2023/02/image-5.png?resize=1024%2C576)
controller作成
![](https://i0.wp.com/zzznorth.cybergence.net/wp-content/uploads/2023/02/image-7.png?resize=372%2C367)
アバターのルートにあるanimatorにさっきのcontrollerを設置
![](https://i0.wp.com/zzznorth.cybergence.net/wp-content/uploads/2023/02/image-8.png?resize=1024%2C576)
animatorタブに移動してさっきのcontrollerに作ったanimationを設置
![](https://i0.wp.com/zzznorth.cybergence.net/wp-content/uploads/2023/02/image-9.png?resize=1024%2C576)
animationに移動して録画開始、設定したいことをする
今回は服を変えるので使わない方をoffに、使う方をonにする設定
![](https://i0.wp.com/zzznorth.cybergence.net/wp-content/uploads/2023/02/image-10.png?resize=1024%2C574)
![](https://i0.wp.com/zzznorth.cybergence.net/wp-content/uploads/2023/02/image-11.png?resize=1024%2C576)
録画終わった後の青色状態を解除するために別のanimationにしておく こうしないとバグる
★Fx設定
![](https://i0.wp.com/zzznorth.cybergence.net/wp-content/uploads/2023/02/image-12.png?resize=1024%2C574)
parametersに移動してparameter追加 Bool指定
![](https://i0.wp.com/zzznorth.cybergence.net/wp-content/uploads/2023/02/image-13.png?resize=1024%2C576)
名前はわかりやすく(あとでexmのparameterでも使う)
![](https://i0.wp.com/zzznorth.cybergence.net/wp-content/uploads/2023/02/image-14.png?resize=1024%2C576)
layersに移動して新規作成 Weightを1に!
![](https://i0.wp.com/zzznorth.cybergence.net/wp-content/uploads/2023/02/image-15.png?resize=1024%2C576)
作ったlayerにanimationを入れる オレンジ色が初期指定のanimation
灰色を右クリックしてdefault stateを押すと切り替え可能
![](https://i0.wp.com/zzznorth.cybergence.net/wp-content/uploads/2023/02/image-16.png?resize=1024%2C576)
make Transitionで推移を設定 どちらの方向へも
![](https://i0.wp.com/zzznorth.cybergence.net/wp-content/uploads/2023/02/image-17.png?resize=1024%2C576)
推移部分(矢印あるところ)をクリックしてCondisionsを設定
![](https://i0.wp.com/zzznorth.cybergence.net/wp-content/uploads/2023/02/image-18.png?resize=383%2C91)
逆はfalseで
★exm設定
![](https://i0.wp.com/zzznorth.cybergence.net/wp-content/uploads/2023/02/image-21.png?resize=1024%2C576)
アバターのルートにある画面で下側にあるexpressionsにあるparameterをクリック
![](https://i0.wp.com/zzznorth.cybergence.net/wp-content/uploads/2023/02/image-19.png?resize=1024%2C575)
Fxで追加したparameterと同じ文字を入れる FxのようにBool
![](https://i0.wp.com/zzznorth.cybergence.net/wp-content/uploads/2023/02/image-22.png?resize=1024%2C576)
上にあるメニューにてAdd control さっき作ったparameterを設定
Typeはtoggleで(buttonは押したときのみ)
これでok
あとはテストビルドで動作確認
![](https://i0.wp.com/zzznorth.cybergence.net/wp-content/uploads/2023/02/image-23.png?resize=1024%2C576)
![](https://i0.wp.com/zzznorth.cybergence.net/wp-content/uploads/2023/02/image-24.png?resize=1024%2C576)
動く!
おわり