查看: 777|回复: 0
打印 上一主题 下一主题

Virtools 进阶教程—Has Attribute属性

[复制链接]

5552

主题

2

听众

8万

积分

首席设计师

Rank: 8Rank: 8

纳金币
-1
精华
11

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

跳转到指定楼层
楼主
发表于 2012-8-21 15:36:58 |只看该作者 |倒序浏览
    Has Attribute


Ins***ction:
  此范例可以和「Groups」作比较。
  物体由Mouse Cursor碰触后会产生旋转的效果,旋转的速度则利用Attribute-My Own Float来控制,当Mouse Cursor离开物体时,物体便停止旋转。
Building Blocks:
(a) Set As Active Camera-Cameras/Montage/Set As Active Camera

(b) Text Display-Interface/Text/Text Display

(c) 2D Picking-Interface/Screen/2D Picking

(d) Has Attribute-Logics/Attribute/Has Attribute

(e) Per Second-Logics/Calculator/Per Second

(f) Rotate-Transformations/Basic/Rotate
制作构想:
  主要是利用Building Blocks-Has Attribute赋予每个物体其属性不同的参数值来影响物体旋转的速度,再配合Building Blocks-Per Second、Rotate便可以达到旋转的效果。
制作步骤:
(a) Camera


  Set As Active Camera:设定现在所使用的Camera。设定Target-NA即正前方。 Text Display:文字说明。
(b) Ground


  Get Mouse Position:由Mouse Cursor即可得到2D 位置,由pOut输出(如图标)。


  2D Picking:利用pIn输入Mouse Cursor 2D的坐标位置而得到一物体,并于pOut输出该物体Object Picked;且不勾选Edit Parameters-Window Relative。
  如果输出为***e即执行Building Blocks-Has Attribute;输出为False即重新执行2D Picking。
  Has Attribute:首先于Level Manager/Default Level/Global/3D Objects/Rock/Add Attribute/My own attribute增加属性-My own float,再设定属性My own float值为4。
  其它物体Ball、Box、Statue依同样方式将属性My own float值分别设定为2、3、1(如图标)。
  设定Target-即Building Blocks所输出物体Object Picked;设定Category--My own attribute-、Attribute-My own float(如图标),此属性My own float值将影响其旋转的速度。
  最后由pOut输出变量值Attribute Value。


  Per second:由pIn输入变量Attribute Value作为1秒钟所旋转的角度值X,乘上一个Frame所花费时间,在pOut输出Y(旋转角度值)。
  T X(pIn) * Elapsed Time = Y(pOut) Rotate:设定Target-即Building Blocks所输出物体Object Picked。
  于Angle of Rotation的pIn输入旋转角度值Y,设定Axis of Rotation-Y轴;设定Referential of the Axis--NULL-以World坐标轴为参考 (如图标)。 来源:网络

分享到: QQ好友和群QQ好友和群 腾讯微博腾讯微博 腾讯朋友腾讯朋友 微信微信
转播转播0 分享淘帖0 收藏收藏0 支持支持0 反对反对0
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

手机版|纳金网 ( 闽ICP备2021016425号-2/3

GMT+8, 2025-7-19 03:24 , Processed in 0.071900 second(s), 28 queries .

Powered by Discuz!-创意设计 X2.5

© 2008-2019 Narkii Inc.

回顶部