PDA

View Full Version : Disable mouse click till Avatar finish its instructions


Vishav
12-10-2018, 11:04 AM
I want to user of my interface will only able to click on object shown by avatar only after avatar finish speaking. How its possible?

As user sometime click the target while avatar speaking which causes my code to stop work. Please Help.

Jeff
12-12-2018, 03:38 AM
Use the viztask.runAction (https://docs.worldviz.com/vizard/latest/#commands/viztask/runAction.htm) command to run an action (e.g. speak action) and wait for it to finish. Before running the action you can disable the mouse and after it completes you can enable the mouse. Can you describe further what you mean by clicking on an object?

Vishav
12-12-2018, 05:30 AM
Clicking Object means avatar give two options to children and children has to click on right option. But children usually click on the option before avatar finish command. I want to disable mouse at that time. How it is possible?

Jeff
12-12-2018, 11:09 PM
You could hide the visibility of the mouse cursor using the setVisible (https://docs.worldviz.com/vizard/latest/#commands/viz/mouse/setVisible.htm) command. Or you could disable (https://docs.worldviz.com/vizard/latest/#commands/node3d/GUI/disable.htm) the GUI objects you don't want clicked.

Vishav
01-06-2019, 05:35 AM
Is it possible to disable mouse function for some time rather than hiding visibility of mouse?