![]() |
|
|
|
#1
|
|||
|
|||
|
If you don't know where to find the vizconnect config file, you probably didn't use vizconnect
![]() Check what tracker the viz.MainView is linked to, and what things are done to that tracker. Sounds to me like the MainView is just stuck in the ground (or somewhere else outside the level) in your "maze" demo because it's not connected to the controller node, and in case of the pit demo, the PitTrackedFaller class is not applied to the correct tracker either. |
|
#2
|
|||
|
|||
|
Well..
I'm kinda new to this so i try to catch up with you.. Thing is i dont need to import vizconnect in for the oculus or the controller to work. vizard detects them In that case (if i understand correctly) why is the vizconnect config matters ? Is there a vizconnect config to each scene ? If i get it right there is a kind of conflict with the mainview link (?) (linked to the oculus / linked to the xbox controller) I have the feeling its a minor thing i'm missing here I just need the oculus for the view and the controller to walk in the maze demo instead of the keypad (sounds simple.. ![]() Attached is the script for the controller (i disabled the oculus) and the controller works fine. Again, when i enables the oculus the controller doesn't respond (thou all its buttons responding..) Guess i just need the correct script for running them both together the script i use - (basicly connect oculus + maze + controller): import viz import vizact import vizcam import sys import vizinfo import oculus # Initialize window viz.setMultiSample(8) viz.go() """ # Setup Oculus Rift HMD hmd = oculus.Rift() if not hmd.getSensor(): sys.exit('Oculus Rift not detected') # Setup navigation node and link to main view navigationNode = viz.addGroup() viewLink = viz.link(navigationNode,viz.MainView) viewLink.preMultLinkable(hmd.getSensor()) # Apply user profile eye height to view profile = hmd.getProfile() if profile: viewLink.setOffset([0,profile.eyeHeight,0]) else: viewLink.setOffset([0,1.8,0]) """ # Add environment model viz.addChild('maze.osgb') # Load DirectInput plug-in dinput = viz.add('DirectInput.dle') # Add first available joystick joy = dinput.addJoystick() # Set dead zone threshold so small movements of joystick are ignored joy.setDeadZone(0.2) def UpdateMovement(): elapsed = viz.elapsed() # Get the joystick position x,y,z = joy.getPosition() # Get the twist of the joystick twist = joy.getTwist() # Move the viewpoint based on xy-axis value move_amount = 5 * elapsed viz.MainView.move([x*move_amount,0,y*move_amount], viz.BODY_ORI) # Turn the viewpoint left/right based on twist value turn_amount = 90 * elapsed viz.MainView.setEuler([twist*turn_amount,0,0], viz.BODY_ORI, viz.REL_PARENT) vizact.ontimer(0, UpdateMovement) |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Turn using keyboard when using Oculus | Seadna | Vizard | 9 | 01-12-2016 10:54 PM |
| Oculus setZoom | mshukun | Vizard | 3 | 10-24-2014 08:04 AM |