virtools消息传递(1)

Virtools入门学习文档1(frame之间的信息传递Send Message/Wait Message/GetMessage Data)

 

1, 导入一个2DFrame,用作按钮,导入一个3DFrame做消息接收对象

 

2, 给2DFrame添加一个PushButton:

   

On: activates the process.

Off: deactivates the process.

Disable: disables the button.

 

Pressed: is activated whenbutton is pressed.

Released: is activated whenbutton is released.

Active: is activated whenbutton is activated.

EnterButton: is activated when the cursor enters the button.

ExitButton: is activated when the cursor exits the button.

InButton: is activated when the cursor is in the button.

 

ReleasedMaterial: Material to use as the button is released.
Pressed Material: Material to use as the button is pressed.
RollOver Material: Material to use when the mouse is on the button.
Font: font to use if the button must have a text on it.
Text: textto display on the button.
Pressed Offset: Offset to apply to the text when the button is pressed.
Disabled Material: Material to use as the button is disabled.

 

3, 给2Dframe添加SendMessage BB:

    

In: triggers theprocess.
Out: is activated when the process is completed.

Message: message to send. You can create your ownmessage (enter any string you want)
Dest: 3D Entity to send the message to.

You can bind data with your message, by adding Input Parameters to the"Send Message" building block.
These data will be retrieved by using the "Get Message Data" buildingblock.

 

4, 连接两个BB如下图:


设置Send Message的Message输入一个消息,Dest选定为3DFrame的名称:

 

5, 给3DFrame添加WaitMessage 和 Translate BB:

      

 


设置Wait Message 的Message为之前Send Message里的Message 消息一致。

设置Translate:

两个BB连起来

6, 运行一下,点击

点击紫色按钮后,观察飞行器是否移动了。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值