WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 10-21-2016, 06:34 AM
Patrick Patrick is offline
Member
 
Join Date: Oct 2016
Posts: 13
Ok i now understand how you can assign the keys to the tracker via the input but i am missing the code for that

def update(event):
if rawInput['keyboard'].isButtonDown(3):
event.sendEvent(e=viz.Event(mag=1))
rawEvent[_name].setUpdateFunction(update)

basicly here i realise that .isButtonDown(3): is the command for the 2 key on the keyboard
but how do i for example trigger the B button on my xbox controller? i just dont seem to find the documentation for that.
All i found was the joystick basics: http://docs.worldviz.com/vizard/Vizjoy_basics.htm

I added the joystick as input to your example and tried to setup the event code afterwards but i cant really complete these lines

def update (event):
if raw_input['joystick'] <-i guess here is sth missing
event.sendEvent(e=viz.Event(mag=1))
rawEvent[_name].setUpdateFunction(update)

Sorry for bothering with that cause it feels like that must be one of the simpliest things but i just dont know how to go on
really appreciate your help

Last edited by Patrick; 10-21-2016 at 06:36 AM. Reason: missspelling
Reply With Quote
  #2  
Old 10-31-2016, 02:52 AM
Patrick Patrick is offline
Member
 
Join Date: Oct 2016
Posts: 13
After a bit more trying i get the following Error:
TypeError: 'function' object has no attribute '__getitem__' in my move_hand_out Event Code
I just added the .XBOX_BUTTON_DPAD_UP line in
I attached my Input code and the event code maybe you could help me there
Click image for larger version

Name:	Event_move_hand_out.PNG
Views:	3669
Size:	23.5 KB
ID:	846
Click image for larger version

Name:	Input_joystick.PNG
Views:	3733
Size:	26.7 KB
ID:	847
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
Regarding Vizard+LeapMotion Hardware Controller Integration rajnishv Vizard 7 11-23-2016 09:11 AM
Using highlighter tool with wand Samuli Vizard 2 09-24-2015 12:50 PM
PS3 controller Darkmax Plug-in development 2 02-26-2010 11:57 AM


All times are GMT -7. The time now is 03:37 PM.


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