Virtools 高级教程—Pan Camera - Virtools
Pan Camera
Instruction:
此范例可以和「Following Camera」作一个比较,这里所表现出来的效果是Camera-New Camera的镜头始终对着人物-Eva,且与Eva保持一定的距离;Camera不会随着Eva转动而跟着移动,只因Eva移动而跟着移动。
Building Blocks:
(a) Character Controller-Characters/Movement/Character Controller
(b) Character Keep On Floor-Characters/Constraint/Character Keep On Floor
(c) Keyboard Controller-Controllers/Keyboard/Keyboard Controller
(d) Object Slider-Collisions/3D Entity/Object Slider
(e) Set Position-3D Transformations/Basic/Set Position
(f) Look At-3D Transformations/Constraint/Look At
(g) Keep At Constant Distance-3D Transformations/Constraint/Keep At Constant Distance
(h) Set As Active Camera-Cameras/Montage/Set As Active Camera
制作构想:
首先必须利用Building Blocks-Character Controller、Keyboard Controller设定键盘控制Eva的动作;再利用Character Keep On Floor、Object Slider等设定Eva与地面接触和碰撞等属性。
此外,可以增加一个3D Frame-New 3D Frame,再配合Building Blocks-Set Position、Look At、Keep At Constant Distance的方式,可以表现出Camera迟缓移动的效果(如图标)。
制作步骤:
(a) Eva
Character Controller:设定Eva的Animations。
首先从Virtools Resources/Characters/Animations/Skin Character Animation/Eva里点选Wait.cmo、Walk.cmo、Walk Bckwd.cmo以及Run.cmo并拖曳至Eva,再设定Stand Animation、Walk Animation、Backward Walk Animation以及Run Animation(如图标)。
Keyboard Controller:设定Eva可以经由键盘来操控动作,内定值为Wait-None、Walk-Key 8、Turn Left-Key 4、Turn Right-Key 6、Backward Walk-Key 2、Run-Key Insert。
Character Keep On Floor:于Level Manager/Default Level/Global/3D Objects/Plane/Add Attribute/Floor Manager/Floor增加保持与地面接触的属性,再于Building Blocks-Character Keep On Floor作循环即可(如图标)。
Object Slider:设定Eva的碰撞属性Group Obstacles Eva;Radius-碰撞半径(如图标)。
(b) New Camera
Get Position:设定Inputs-Character(Eva)、None;Operation-Get Position以取得Eva的位置;Ouput-Vector(向量)。
Addition:设定Inputs-Vector(Evas位置向量)、Vector(0,2,8);Operation-Addition;Ouput-Vector(向量)。