3D Transformations

Add Child And Set Parent

Instruction:
控制BallBoxHierarchy關係,來間接控制Ball是否繞著Box旋轉。

Building Blocks
(a) Per Second-Logics/Calculator/Per Second
(b) Switch On Key-Controllers/Keyboard/Switch On Key
(c) Rotate-Transformations/Basic/Rotate
(d) Add Child-Transformations/Basic/Add Child
(e) Set Parent-Transformations/Basic/Set Parent
(f) Text Display-Interface/Text/Text Display
(g) Set As Active Camera-Cameras/Montage/Set As Active Camera

製作構想
為了控制Ball是否隨著Box運動,即可使用Building Blocks-Per second、Add Child等Building Blocks來控制其Hierarchy的關係。

製作步驟
(a) Box

Per second:設定1秒鐘所旋轉的角度值X(Turn:圈數;Degree:角度),乘上一個Frame所花費時間,在pOut輸出旋轉角度值Y。
T X(pIn) * Elapsed Time = Y(pOut)
Rotate:於Angle of Rotation的pIn輸入旋轉角度值Y,設定Axis of Rotation-Y軸(如圖示),再作迴圈即可。

(b) Box

Switch On Key:控制Hierarchy關係-Key Board鍵'0'和'1'。
Add Child:按下'0'時增加Box的Child-Ball,使Ball隨著Parent-Box旋轉,在Out輸出給Text Display(上),同時切斷Text Display(下)。
Text Display:文字說明。
 
(c) Ball
 
Set Parent:按下'1'時中斷Ball的Parent-Box,使Ball不隨著Box旋轉,在Out輸出給Text Display(下),同時切斷Text Display(上)。
 
註:因為沒有Building Blocks-Remove Child,所以將Set Parent中的Parent設定為'-NULL-'即可去除Ball和Box的Hierarchy關係(如圖示)。

(d) Camera

Set As Active Camera:設定現在使用的Camera。

愛迪斯科技股份有限公司版權所有,本網站各連結標題,商標及連結內容歸原權利人所有.
台北市內湖區民權東路六段16011樓之
2 Tel:(02)2791-2917 Fax:(02)2791-2916
CopyRight 2001-2002 Axis 3D Technology,inc. All rights reserved.