◆前回

 

 

久しぶりのUnity。

お題 Animate your world

 

Platformer Microgame - Unity Learn

 

We have a simple component that changes the position, rotation, and scale of any GameObject in your scene. This can add some movement and breathe life into your world.

シーン内のゲームオブジェクトの位置、回転、大きさを変える簡単なコンポーネントがある?

 

 

手順1

1. In the Project View, select Assets > UTech > MG-Platformer > BasicAssets > Environment > Sprites.

ProjectView でSpritesを選択せよと

 

 

手順2

2. Select the “tree” Sprite.

次はtreeを選ぶのね。ふむふむ

 

 

手順3

3. Drag the tree into the Scene.

treeをSceneにドラッグしましょう。

 

 

手順4、5

4. In the Inspector, click Add Component and type in “Jiggler”

5. Click on the Jiggler component to add it.

Add componentをクリックして、Jiggerを入力?

で、Jiggerをクリックして追加

 

とりあえず "ji" とだけ入力したら出てきたのでクリック!

 

手順6

6. By default, the Jiggler component will do a bit of Jiggling on the scale. Click Play and check it out.

Let’s add another tree and customize it!

デフォルトではスケール上でbit of Jigglingする?

bit of Jigglingってなんだろ…翻訳してみたらちょっと揺れるみたい?

Playしてみよう。

静止画ではわからないけどウニウニ動きました。

 

 

手順7

7. While you have your tree selected in the Hierarchy, select Edit > Duplicate, or press the shortcut Ctrl-D/Cmd-D.

追加したtreeを選んでDuplicateを選択するか、Ctrl+Dで複製したいのかな?

 

手順8

8. With your tree still selected in the Hierarchy, select the Move Tool in the toolbar.

9. Drag the arrows to move the tree.

なんかMoveツールを使ってtreeを動かせって言ってる?

 

普通にドラッグしてもいいんじゃないかな?

 

 

手順10

10. Let’s make the Tree spin. In the Inspector, under Rotation Jig Amount, type in 100 for the Z value. This will make the Tree rotate back and forth.

treeを回転させよう!

Rotation jig amountのZを100にせよということらしい。

 

100にしてみた。

 

 

手順11

11. Click Play and get a glimpse of what animating your world does for your game!

プレイボタンを押して確認します。

 

右側のtreeに回転量を入れたので、その通り動いてます。

Zの値を入れることで、Z軸を回転軸にして設定値分だけ回転するようです。

 

X軸やY軸の回転量を入れるとそれぞれを軸に回転してました。

 

 

というところで、今回のお題はこれで終了!

 

 

 

◆次回