WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 02-19-2015, 10:35 AM
JB_HP_Viz JB_HP_Viz is offline
Member
 
Join Date: Jun 2014
Posts: 31
How to map HTML button to Transport in Vizconnect

I’ve setup an HTML page with a button on it using vizhtml

<input id='forward' type=button value="Forward">

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
Attached Thumbnails
Click image for larger version

Name:	transport_drving_keyboardmap.jpg
Views:	1048
Size:	39.0 KB
ID:	680  
Reply With Quote
  #2  
Old 02-23-2015, 05:33 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
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.
Reply With Quote
  #3  
Old 02-23-2015, 10:26 AM
JB_HP_Viz JB_HP_Viz is offline
Member
 
Join Date: Jun 2014
Posts: 31
Thank you. That would be great if you can provide an example.
Reply With Quote
  #4  
Old 02-24-2015, 07:38 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
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.
Attached Files
File Type: zip driving_vizhtml.zip (2.6 KB, 1202 views)
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Switching between input devices setup in vizconnect and not using vizconnect JB_HP_Viz Vizard 1 01-20-2015 05:19 AM
Vizconnect Save As Dialog Jeff Vizard 0 05-01-2014 09:45 AM
A door question... left button mouse Sakiot Vizard 3 08-26-2011 12:45 AM
Create Button or Text Chrissy2009 Vizard 1 07-15-2009 05:34 PM
button problems cade_mccall Vizard 3 02-22-2007 09:48 AM


All times are GMT -7. The time now is 11:20 PM.


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