- Изменено
アニメーション再生位置をUnity内で決定したい。
例えばUnityでビーカーに水を入れるゲームを作りたい。
For example, I want to make a game in Unity where I pour water into a beaker.
そのため私はビーカーに水を注ぐSpineを作りたいと思います。
Therefore I would like to create a Spine that pours water into a beaker.
まず、水面が波打つアニメーションを作りました。
First, I created an animation of the water surface rippling.
つぎに、ビーカーの中の水の量によって、水位が変わるようにしたいです。
Next, I want to make the water level change depending on the amount of water in the beaker.
このとき、波打つアニメーションの再生をどこですればよいか、どうUnityで実装すればよいか困っています。
At this point, I'm not sure where to play the rippling animation, or how to implement it in Unity.
なにか良い実装方法ありませんか。
Is there a good way to implement this?
例えば100mlのビーカーの30mlの場所まで水を入れた状態などをSpineでどう作ればよいかということになります。
For example, how can I create a 100ml beaker with 30ml of water in it using Spine?
水面を常にアニメーション化する必要があると思います。 波/波紋アニメーション、これは正しいですか?
私が考えることができる1つの方法は、水を2つの部分に分割することです。
1)アニメーション化された波/波紋のある表面部分。 このパーツは、「サーフェス」ボーンにアタッチされた塗りつぶしのパーセンテージに従って上下に移動します。
2)ビーカーの0-100%を下から表面まで覆うように拡大縮小(または変形)された水の長方形。
次に、塗りつぶしのパーセンテージがサーフェスボーンを上下に移動している間に、サーフェスのアニメーションを別のトラックで継続することができます。
私は単なるプログラマーなので、もっと良い解決策があるかもしれません。
:nerd:
I assume that you need the water surface to be animated all the time, showing e.g. wave/ripple animation, is this correct?
One way I can think of would be splitting the water into two parts:
1) the surface part, with animated waves/ripples. This part is translated up and down according to the fill percentage, attached to a surface
bone.
2) A water rectangle that is scaled (or deformed) to cover 0-100% of the beaker, from bottom to surface.
Then you could have an animation for the surface continuing on a separate track, while the fill percentage is moving the surface bone up or down.
I'm a mere programmer though, so there might be better solutions out there. :nerd:
ありがとう。
もらった案で実装できないか調べてみようと思います。
丁寧に説明ありがとうございました。
Thank you.
I'm going to see if I can't implement the idea you gave me.
Thank you for the detailed explanation.
どういたしまして! 戻ってきてくれてありがとう。 何か問題が発生した場合はお知らせください。エリカも素晴らしいアイデアを思いつくことができると思います。
You're welcome! Thanks for getting back at us. If it should cause some problems, please let us know, I'm sure that Erika can come up with some great ideas as well.