WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   How to map HTML button to Transport in Vizconnect (https://forum.worldviz.com/showthread.php?t=5293)

JB_HP_Viz 02-19-2015 10:35 AM

How to map HTML button to Transport in Vizconnect
 
1 Attachment(s)
I’ve setup an HTML page with a button on it using vizhtml



And when that button is clicked it sends a message to Vizard

$("#forward").click(function() {
socket.send( 'forward' , viz.Data({}) );
});

Is there a way to map this HTML button to the Driving Transport in the vizconnect configuration file instead of mapping an input device like a keyboard or Joystick to the Driving Transport?

Attached JPEG shows mapping Keyboard keys to Driving Transport, I would like to be able to map an HTML button. Is there a way to setup a Driving Transport and then map HTML button in the code?


Thank you

John

Jeff 02-23-2015 05:33 AM

This is not possible through the vizconnect GUI but should be possible by manually modifying the config file. I'll try and post a simple example soon.

JB_HP_Viz 02-23-2015 10:26 AM

Thank you. That would be great if you can provide an example.

Jeff 02-24-2015 07:38 PM

1 Attachment(s)
In the attached example the transport is defined in the vizconfig file but the transport's update function is moved to the main script. In the main script, there is a class which stores the button states. The update function moves the transport based on these button states.


All times are GMT -7. The time now is 04:18 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC