この文書の現在のバージョンと選択したバージョンの差分を表示します。
| 両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン | ||
|
vci:sample:ongrab:no1 [2023/09/29 20:28] pastatto 非推奨のAPIを書き換えてサンプルの差し替え |
vci:sample:ongrab:no1 [2023/10/11 17:48] (現在) pastatto 概要を編集 |
||
|---|---|---|---|
| ライン 1: | ライン 1: | ||
| - | ====== 風車をつかんだら回りはじめ_放すと止まる ====== | + | ====== 風車をつかんだら回りはじめ、放すと止まる ====== |
| **[[https://developer.virtualcast.jp/vci-docs/api/events/onGrab.html | onGrab]]**を使用してオブジェクトをつかむとアニメーションを開始し、\\ | **[[https://developer.virtualcast.jp/vci-docs/api/events/onGrab.html | onGrab]]**を使用してオブジェクトをつかむとアニメーションを開始し、\\ | ||
| - | **[[https://developer.virtualcast.jp/vci-docs/api/events/onUngrab.html | onUngrab]]**を使用して手を離すとアニメーションが停止するVCIを作成します。 | + | **[[https://developer.virtualcast.jp/vci-docs/api/events/onUngrab.html | onUngrab]]**を使用して手を離すとアニメーションが停止するVCIを作成します。\\ |
| + | アニメーションの再生には[[https://developer.virtualcast.jp/vci-docs/api/classes/ExportAnimation/PlayFromName.html|PlayFromName]]を使用します。 | ||
| + | |||
| + | 他のサンプル:[[vci/sample/animation/tutorial2]] | ||
| === サンプルデータ === | === サンプルデータ === | ||
| ライン 8: | ライン 11: | ||
| {{ :vci:sample:ongrab:チュートリアルファン.zip |}} | {{ :vci:sample:ongrab:チュートリアルファン.zip |}} | ||
| - | ===== オブジェクトの構成 ===== | + | ==== オブジェクトの構成 ==== |
| オブジェクトの構成は次のようになっています。 | オブジェクトの構成は次のようになっています。 | ||
| - | {{ vci:sample:tutorial_fan1.png?600 }} | + | {{ vci:sample:animation:tutorial_fan1.png?direct&600 }} |
| - | ===== アニメーション制作 ===== | + | 各オブジェクトのコンポーネントは次のとおりです。\\ |
| + | fan,baseには特に何も追加しません。 | ||
| + | |||
| + | {{ vci:sample:animation:tutorial_fan5.png?direct&600 }} | ||
| + | |||
| + | {{ vci:sample:animation:tutorial_fan6.png?direct&600 }} | ||
| + | |||
| + | ==== アニメーション制作 ==== | ||
| ファンが回転するアニメーションが必要なので作成します。\\ | ファンが回転するアニメーションが必要なので作成します。\\ | ||
| ライン 22: | ライン 32: | ||
| この設定を忘れると**アニメーションが動かない**ので確認しましょう。 | この設定を忘れると**アニメーションが動かない**ので確認しましょう。 | ||
| - | {{vci:sample:tutorial_fan2.png?400|}} | + | {{ vci:sample:animation:tutorial_fan2.png?direct&600 }} |
| - | {{vci:sample:tutorial_fan3.png?400|}} | + | {{ vci:sample:animation:tutorial_fan3.png?direct&600 }} |
| - | + | ||
| - | {{vci:sample:tutorial_fan4.png?400|}} | + | |
| - | + | ||
| - | ===== コンポーネント設定 ===== | + | |
| - | 各オブジェクトのコンポーネントは次のとおりです。\\ | + | |
| - | fan,baseには特に何も追加しません。 | + | |
| - | {{ vci:sample:tutorial_fan5.png?600 }} | + | {{ vci:sample:animation:tutorial_fan4.png?direct&600 }} |
| - | {{ vci:sample:tutorial_fan6.png?600 }} | ||
| ===== VCIスクリプト ===== | ===== VCIスクリプト ===== | ||